Lesson 26 of 30
Redux, Zustand, Jotai, and Context all answer 'how does shared state get updated and read across an app' — but they disagree sharply on ceremony, granularity, and how they interact with re-renders.
13 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 2
A component subscribes to one small piece of frequently-changing shared state via plain React Context. What performance problem is it likely to hit that an atomic library (like Jotai) would avoid?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
Once state needs to be shared across many components that aren't close together in the tree, useState plus prop-drilling gets unwieldy. The libraries in this space all solve that, with real, different tradeoffs:
Prop drilling: passing 'theme' through 5 layers of components that don't use it, just to reach the one that does.
useState/useReducer covers it completely, with real ceremony saved."Which state management library would you use for this app, and why?" is a real, common systems-design question — a strong answer connects the choice to actual re-render/subscription granularity and to the client-state-vs-server-state distinction, not to which library is currently trendiest.