All right.
My friends we've now spent a tremendous amount of time taking a look at this reducer stuff.
So now in this video while this knowledge is still fresh I want to go through a little exercise.
So here's what we're gonna do.
I would like you to go back to that counter screen we put together.
Remember that was a very simple pretty basic state.
Example I would like you to refactor it to have that component manage it state with the use reducer
hook instead of you state.
So if you go through this exercise you're not going to have any more references to you state inside
that entire component.
You will only make use of use reducer.
Remember in general we either make use of use reducer or use state whenever we're thinking about managing
a single value of state now technically this counter example is not really a good place to use a reducer
using the you state hook is definitely ideal.
Nonetheless it is a pretty straightforward example of state.
And so it'd be a good place to just practice setting up the use reducer hook.
So even though it's not super ideal Hey give it a shot anyways as usual if you don't want to do this
exercise don't sweat it just skip to the next video and we'll go over a very quick solution together
we've really taken a look at reduces once so I promise I'm not going to make you struggle through like
a 15 minute video again as we refactor that component so give it a shot and I'll see you in just a moment.