In this React Hooks Tutorial, we're going to cover how to use the useState hook to update a state based on the previous state.
This is a useful hook to use if you want to keep track of what has happened in a given state, without requiring a separate state management component. We'll use this hook to update a component's state based on the previous state, so that we can keep track of what has been changed in the previous state.