lifting state
Move shared state to the nearest owner that can coordinate its users.
Use this when Sibling controls must edit and display the same value.
without the term
“I have a dropdown in the sidebar and a list in the main panel and they're supposed to show the same selected item, but they get out of sync. Can you make them share it properly without making everything global?”
with the term · How do you ask a model for lifting state?
Lift this shared selection to the nearest common owner. Verify that both controls update together and unrelated panels remain independent.
What is lifting state?
Lifting state gives cooperating components one owner and passes values or actions to their consumers.
Why does lifting state matter when vibe coding?
Duplicated local copies drift; unnecessary global state couples unrelated screens.
How do you do lifting state?
Find the smallest shared owner. Check that editing either control updates both views.
What goes wrong with lifting state?
Moving all state to the application root makes a local interaction global.