In React, 'lifting state up' means:
Correct answer
B. Moving shared state to the closest common parent
15 views
B. Moving shared state to the closest common parent
15 views
When sibling components need the same data, the state moves to their nearest common parent, which passes it down as props, along with callbacks to update it.
Asked in: React Interviews, Frontend Developer Tests
Not sure why the answer is B? Ask here and get an explanation.