Lifting State Up: Principles & Examples
Move shared state to the closest common ancestor and pass it down via props.
Welcome
In this lesson you will learn the lifting state up pattern — moving shared state to the closest common ancestor so sibling components can stay in sync.
The Problem: Out-of-Sync Siblings
When two sibling components both need the same data, keeping separate state in each leads to synchronisation bugs. The fix is to move state to their common parent.
All lessons in this course
- Lifting State Up: Principles & Examples
- Prop Drilling: When It Hurts & When It's Fine
- Sibling Communication Patterns
- Choosing the Right State Location