
State Management Without Libraries
Redux, MobX, Zustand... do you really need them? Often, React's built-in tools are enough. Letβs climb the state complexity ladder and see where your app actually lands.
Before reaching for an external state management library, every engineer should ask: "What problem am I actually solving?" In the modern React ecosystem, we often over-engineer before we even hit a bottleneck.
The State Complexity Ladder
Think of state as a ladder. You only move up when the current step can no longer support your weight:
Level 1: Local State
π Scope: Single component.
π Tool:
useStateoruseReducer.
Level 2: Lifted State
π Scope: Parent and direct children.
π Tool: Prop drilling (it's not a crime, it's explicit).
Level 3: Context
π Scope: Cross-cutting concerns (Auth, Theme, i18n).
π Tool:
useContext.
Level 4: External Library
π Scope: Complex async flows, heavy computed state, or time-travel debugging.
π Tool: Zustand, Redux, Jotai.
Most Apps Stop at Level 3
Context combined with custom hooks solves 90% of state management needs. Look at this clean Auth implementation:
TypeScript
When Do You Actually Need a Library?
Be honest with your architecture. Consider external tools only when:
You genuinely need time-travel debugging.
You have insane async flows with frequent race conditions.
Your state updates are highly interdependent and causing massive re-renders that memoization can't fix.
The Lazy Ant Approach
Start with local state.
Lift only when needed.
Add context sparingly.
Reach for libraries last.
Most complexity comes from over-engineering, not under-tooling.

