frontend / README.md

State Management — Senior Interview Prep

1 min read index source

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

Topic
Server state vs client state — the core framing
Choosing a state library — decision framework

Client-state libraries

Library File
Zustand (single store) zustand.md
Jotai (atomic) + Valtio (proxy) jotai_valtio.md
MobX (observable) mobx/README.md
Redux core, middleware, selectors redux/

Server-state libraries

Library File
RTK Query (Redux-integrated) redux/rtk_query.md
TanStack Query (standalone) ../11_apis_data_fetching/02_tanstack_query.md

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_vs_client_state.md.
  • “Why not just put everything in Redux?” — reimplements caching; boilerplate cost. See choosing_a_state_library.md.
  • “How does cache invalidation work in RTK Query / TanStack Query?” — tags vs invalidateQueries. See redux/rtk_query.md.
  • “Zustand re-renders too much — why?” — selector returning a fresh object without shallow equality. See zustand.md.

Cross-references