What does lifting state up in React mean?

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

One Reply to “What does lifting state up in React mean?”

Leave a Reply

Your email address will not be published. Required fields are marked *