Lifting State Up
When two components need the same data, move the state to their closest common parent and pass it down as props, along with functions to change it.
Examplereact
Both children stay in sync because they share one piece of state in App.
Quick check
Two sibling components need the same state. Where should it live?
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.