Learn Topics: Lifting State Up required for this wave
In Wave 03 we will update the Task List Front End to store state in the App. For this wave you should make sure that that you are on the main branch.
Lifting up state will set us up to connect our front end to our back end API.
We will update and implement the following features:
- Update the toggle
completefeature of eachTaskto update the state of the task data stored inApp. - Add a feature to delete a
taskfrom the task data stored and rendered by theApp.
Expand for hints on lifting the state up to App
- Remove state from the
Taskcomponent and instead simply render the props. - Update
App.jsxto store the list of task data in state. - Update the data passed to
TaskListthrough props to use the task data stored in state.
Expand for hints on updating the toggle complete feature.
- Build a function to update an individual task (toggling its
isCompletefield) inApp.- This function will need the
idof the task to modify. - This function will need to update the task data stored in state.
- This function will need the
- Pass this function as a callback through
TaskListtoTask - Update button to receive the callback function in the
onClickattribute.
Expand for hints on implementing the delete feature.
- Build a function to delete an individual task in
App.- This function will need the
idof the task to delete. - This function will need to update the task data stored in state.
- This function will need the
- Pass this function as a callback through
TaskListtoTask - Update button to receive the callback in the
onClickattribute.