← All notes

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

Sources

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

Permanent ID: iil:note:ebnhevcp

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.},
}

Markdown

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.