ALI KORPEEST. 2024
React

State Management in 2024: What to use?

Ali Korpe
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

  1. Context API: Great for compound components and static global state (Theme, User). Bad for rapidly changing data.
  2. Zustand: My default choice. Minimal boilerplate, works outside components.
  3. Redux Toolkit: Only for massive enterprise apps with complex state logic.
  4. 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
Ali Korpe

About Ali Korpe

Software developer specializing in Photoshop automation and efficient workflows. Building tools that help creators save time and focus on what matters. Creator of Auto Bulk Mockup.

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.

Have a project in mind?

Whether you need a custom plugin, design work, or just want to say hello.

Let's Work Together