Skip to content

⚛️ React + Stunk

Stunk works perfectly with React using the useChunk hook.
It makes your components react to state changes instantly — no extra setup.


💡 Why useChunk?

Reactive & Fast – Updates UI automatically when the chunk changes
Optimized Rendering – Use selectors to avoid unnecessary re-renders
Simple & Flexible – Works with numbers, objects, or async state

📦 Installation

Install Stunk in your React project:

bash
# npm
npm install stunk

# yarn
yarn add stunk

# pnpm
pnpm add stunk

# bun
bun add stunk

🚀 What’s Next?

Next, we’ll learn how to use the useChunk hook inside React components — to read, update, and react to state changes effortlessly.