Find the State Owner
Place state at the closest common owner and avoid duplicate derived state.
State drift A route renders FilterBar, ResultsTable, and ResultSummary. All three need the selected status filters, and ResultSummary also shows the count. The principle is closest common ownership plus minimal state. React state placement Minimal state -> readers -> owner Do not ask where the hook is easiest to write. Ask which value is a source fact, which components read it, and which component can own it without leaking details everywhere. Patch local state Fast patch, future drift. One source drives every dependent view. If two state values can disagree, one of them probably should be derived. 01 Source 02…
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in