⚛️ React Stunk
Stunk integrates effortlessly with React through the useChunk
hook, enabling components to reactively read and update state from a Chunk.
Why use useChunk
?
✅ Reactive & Efficient – Automatically updates components when state changes.
✅ Optimized Rendering – Supports selectors to prevent unnecessary re-renders.
✅ Simple & Flexible – Works with primitive values, objects, and async state.
Installation
Install stunk
if you have not.
bash
# npm
npm install stunk
# yarn
yarn add stunk
# pnpm
pnpm install stunk
# bun
bun add stunk
🔗 What’s Next?
Now, let’s dive into how useChunk
works and how to use it effectively in your React components. 🚀