CodeZettaInterview Hub

React · State Management · Senior · Architecture

Local state vs global state — how do you choose?

Short Interview Answer

Keep state local unless many distant consumers need it or it represents app-wide session/cache.

Detailed Explanation

Over-globalizing creates coupling. Server cache ≠ UI state.

Did you know this answer?