State Management — Senior Interview Prep
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
Server-state libraries
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