What you need to know

If two siblings need the same selected value, separate local state can drift out of sync. Lifting that state to their nearest shared parent gives both components one source of truth.

How to apply it

Let the parent own the value and pass it down as props with callbacks for updates. Keep unrelated state local so the parent does not become a global container for every detail.

Common mistake to avoid

Do not lift state all the way to the root by habit. Choose the smallest common owner that makes the data flow clear.