React
Ali Korpe August 10, 2024 1 min read
State Management in 2024: What to use?

The Fatigue is Real
React developers have too many choices. Here is my simplified decision tree.
The Options
- Context API: Great for compound components and static global state (Theme, User). Bad for rapidly changing data.
- Zustand: My default choice. Minimal boilerplate, works outside components.
- Redux Toolkit: Only for massive enterprise apps with complex state logic.
- TanStack Query: For server state. This replaces 90% of your global state.
My Recommendation
Use TanStack Query for anything coming from an API.
Use Zustand for complex client interaction (sidebar open, modal state).
Use Context for dependency injection.
Tags:#React#State#Zustand#Redux
Get plugin tips in your inbox
Join 2,000+ developers and creators. I share tips on Photoshop automation, UXP development, and indie hacking. No spam, ever.