DEV Community

Discussion on: React Beginner Question Thread ⚛

Collapse
 
theenmanuel23_87 profile image
Enmanuel Jarquin

Is there any way to react to manage the state between components? For example, a component A takes me to component B and B returns to A, but with its original state, to avoid further processing, since there is a lot of data.

Collapse
 
dan_abramov profile image
Dan Abramov

Lift it up to their shared common ancestor. Then it will be preserved between remounting of children.

reactjs.org/docs/lifting-state-up....