What is lifting state up and when should you do it?
Answer
•Moving state to a common parent.
•Needed when multiple components need a single source of truth.
•Parent holds state and passes props down.
•Children call callbacks for changes.
•Alternative — context/store if the tree is large.
Was this answer helpful?