What is Lifting State Up?

Technology CommunityCategory: React NativeWhat is Lifting State Up?
VietMX Staff asked 3 years ago

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.