Skip to main content
React Interview Questions Theory P1 Medium

Derived state, lifting state and useReducer

Where should shared state live? Should a filtered list derived from props and a query be stored in state?

Official Reference

Model Answer & Explanation

Place shared state at the closest common owner that needs to coordinate it. Derive the filtered list during render to avoid two sources of truth. useReducer can centralize related transitions when explicit actions make complex updates clearer. Context can pass data to descendants but does not replace the state model.

Follow-up Interview Question · When would you intentionally initialize local draft state from a prop?

Module Context & References

React · Rendering & hooks theory Explain renders, reconciliation, keys, state, effects and performance
Personal Notes · Markdown

Technologies & Interview Topics Covered

Switch between short-term interview tracks and long-term 80/20 engineering depth to practice JavaScript internals, React rendering and hooks, timed frontend machine coding UI challenges, MeetaPro FG300, Blind 75 & NeetCode 150 DSA patterns, Python & FastAPI APIs, PostgreSQL query optimization & MVCC, Redis caching, Applied AI RAG pipelines & evaluations, and distributed system design.