0 votes
in ReactJS by
edited by

What is Lifting State Up in React?

1 Answer

0 votes
by
edited by

When several components need to share the same changing data then it is recommended to lift the shared state up to their closest common ancestor. That means if two child components share the same data from its parent, then move the state to parent instead of maintaining local state in both of the child components.

Related questions

0 votes
asked Jan 30, 2021 in ReactJS by rajeshsharma
0 votes
asked Feb 14, 2023 in ReactJS by Robindeniel
...