When Jotai Fits: Bottom-Up State
You'll learn: When Jotai's atomic approach is the right choice for your state management needs.
Jotai shines when you're building state from the bottom up rather than top down. Instead of designing a global store structure upfront (like Redux or Zustand), you create small, independent atoms exactly where you need them, then compose them together.
The Bottom-Up Philosophy
Think of Jotai like LEGO blocks. You don't start with a blueprint of the final castle—you grab the bricks you need, snap them together, and build organically. Each atom is self-contained. Need a counter? Create a counter atom. Need filtered data? Create a derived atom that reads from your data atom. No central store setup required.
When Jotai is the Right Choice
Granular, composable requirements: You want individual pieces of state that can be mixed and matched without ceremony. Each component can declare its own atoms and combine them with others.
Avoiding context complexity: You've outgrown Context but don't want Redux boilerplate. Jotai gives you global state without providers (usually) and automatic re-render optimization through selectors.
Async-first patterns: With built-in Suspense integration, Jotai handles async atoms elegantly—no middleware required.
Dynamic state needs: Atom families let you create state on-the-fly for items in lists or tabs without pre-declaring them.
When to Choose Something Else
If your team expects a single, clear store structure that's easy to audit (think Redux), or if you need aggressive DevTools time-travel across all state, Zustand or Redux might fit better. Jotai works best when flexibility and composition matter more than centralized control.
Key Takeaway: Use Jotai when you want to compose state organically from small atoms without upfront store design—perfect for granular, flexible architectures that grow with your components.