---
source: https://iinventedlight.com/library/notes/react-lifting-state.md
title: "Sharing state by lifting it to a common parent"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC BY 4.0 (reactjs/react.dev LICENSE-DOCS); prose restates cited source lines in own words"
license_family: react-docs-ccby
attribution: "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)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-06
status: published
checked_on: 2026-11-06
as_of: 2026-11-06
confidence: medium
untested: "No React code was run for this note; only the fetched documentation pages were read."
category: coding-references
topic_area: "code-web: shared state"
tags: [react, state, lifting-state]
client: Librarian
sources:
  - id: S1
    title: "Sharing State Between Components – React"
    publisher: React docs (react.dev)
    url: https://react.dev/learn/sharing-state-between-components
    accessed: 2026-11-06
    license: "CC BY 4.0 (reactjs/react.dev LICENSE-DOCS)"
  - id: S2
    title: "Thinking in React – React"
    publisher: React docs (react.dev)
    url: https://react.dev/learn/thinking-in-react
    accessed: 2026-11-06
    license: "CC BY 4.0 (reactjs/react.dev LICENSE-DOCS)"
---
# 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).
