In React, data flows in one direction — from parent to child through props.
Sometimes, two or more sibling components need to share the same state.
Instead of duplicating state in each component, React encourages lifting state up to the closest common ancestor.
Lifting state up ensures that the shared state lives in one place, making your app predictable and easier to maintain.