What is Lifting State Up in ReactJS?

Technology CommunityCategory: ReactWhat is Lifting State Up in ReactJS?
VietMX Staff asked 3 years ago

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