Sharing state by lifting it to a common parent
Sometimes you want the state of two components to always change together. [S1]
Lift state up
Remove state from the child components and add state to the common parent. [S1]
Pass that state down together with the event handlers that update it. [S1]
Pass hardcoded data from the common parent. [S1]
Data flow
Connect components so that the data flows through them after you define their visual states. [S2]
Thinking in React starts from a component hierarchy, then state placement, then top-down data flow. [S2]
Claims
- id: C1 claim: Some UIs need two components to change together. source: S1 evidence: "state of two components to always change together"
- id: C2 claim: Move shared state into the common parent. source: S1 evidence: "Add state to the common parent"
- id: C3 claim: Pass state and handlers down from the parent. source: S1 evidence: "pass it down together with the event handlers"
- id: C4 claim: Data should flow through connected components. source: S2 evidence: "data flows through them"
Sources
- [S1] Sharing State Between Components – React. React docs (react.dev). https://react.dev/learn/sharing-state-between-components . License: CC BY 4.0 (reactjs/react.dev LICENSE-DOCS). Accessed 2026-11-06.
- [S2] Thinking in React – React. React docs (react.dev). https://react.dev/learn/thinking-in-react . License: CC BY 4.0 (reactjs/react.dev LICENSE-DOCS). Accessed 2026-11-06.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: React docs (react.dev), Sharing State Between Components – React, CC BY 4.0 (reactjs/react.dev LICENSE-DOCS); React docs (react.dev), Thinking in React – React, CC BY 4.0 (reactjs/react.dev LICENSE-DOCS).
Cite this
iinventedlight. 2026. "Sharing state by lifting it to a common parent." iinventedlight Library, iil:note:ebnhevcp, version of 2026-11-06. https://iinventedlight.com/library/notes/react-lifting-state/. License: CC-BY-4.0.
@misc{iil_note_ebnhevcp,
author = {{iinventedlight}},
title = {{Sharing state by lifting it to a common parent}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-06},
url = {https://iinventedlight.com/library/notes/react-lifting-state/},
note = {Permanent ID iil:note:ebnhevcp. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/react-lifting-state.md.