Frontend / README.md

State Management — Senior Interview Prep

Updated 1 min read index source
On this page6
  1. Start here
  2. Client-state libraries
  3. Server-state libraries
  4. Redux deep-dive (existing files)
  5. How an interviewer probes state management
  6. Cross-references

State Management — Senior Interview Prep

Modern frontend state is two problems, not one: server state (a cache of remote data) and client state (UI state you own). Get that split right and most “which library?” debates resolve themselves. This folder covers the framing, the modern client stores, and the Redux ecosystem.

Start here

Client-state libraries

Library File
Zustand (single store) Zustand
Jotai (atomic) + Valtio (proxy) Jotai and Valtio
MobX (observable) MobX
Redux core, middleware, selectors Redux

Server-state libraries

Library File
RTK Query (Redux-integrated) RTK Query
TanStack Query (standalone) TanStack Query — Cache Keys, Invalidation, Prefetch

Redux deep-dive (existing files)

redux core · Redux Toolkit · middleware · sync vs async middleware · selectors · reselect · dispatch · mapStateToProps · mapDispatchToProps

How an interviewer probes state management

  • “How do you decide where state lives?” — server vs client split, then colocation. See Server State vs Client State.
  • “Why not just put everything in Redux?” — reimplements caching; boilerplate cost. See Choosing a State Library.
  • “How does cache invalidation work in RTK Query / TanStack Query?” — tags vs invalidateQueries. See RTK Query.
  • “Zustand re-renders too much — why?” — selector returning a fresh object without shallow equality. See Zustand.

Cross-references

Contents 16

Notes