Lifting Props Up - Use React's Context API to Access Parent Props

added by JavaScript Kicks
8/19/2019 12:00:00 AM

675 Views

The React Docs have a great section on Lifting State Up for cases where several components share the same changing data. The recommendation is to lift the shared state up to the components' closest common ancestor. The state is then passed as props to the desired descendant components.


0 comments