Course lesson
Identify the need to elevate state to a parent component in React
In this lesson, we look at our "component breakdown diagram" again. It becomes apparent that the state for the input field search value needs to also be available for the NamePicker component. We therefore elevate that piece of state to their common parent...
- Duration
- 1 min
- Access
- Free
- Transcript
- Available
In this lesson, we look at our "component breakdown diagram" again. It becomes apparent that the state for the input field search value needs to also be available for the NamePicker component. We therefore elevate that piece of state to their common parent (App.js), and pass it down to both components via props.