1 00:00:00,850 --> 00:00:01,090 All right. 2 00:00:01,090 --> 00:00:05,020 My friends we've now spent a tremendous amount of time taking a look at this reducer stuff. 3 00:00:05,050 --> 00:00:09,820 So now in this video while this knowledge is still fresh I want to go through a little exercise. 4 00:00:09,910 --> 00:00:10,930 So here's what we're gonna do. 5 00:00:11,650 --> 00:00:14,410 I would like you to go back to that counter screen we put together. 6 00:00:14,410 --> 00:00:17,100 Remember that was a very simple pretty basic state. 7 00:00:17,100 --> 00:00:22,890 Example I would like you to refactor it to have that component manage it state with the use reducer 8 00:00:22,900 --> 00:00:25,150 hook instead of you state. 9 00:00:25,270 --> 00:00:29,200 So if you go through this exercise you're not going to have any more references to you state inside 10 00:00:29,200 --> 00:00:30,790 that entire component. 11 00:00:30,790 --> 00:00:33,430 You will only make use of use reducer. 12 00:00:33,430 --> 00:00:38,800 Remember in general we either make use of use reducer or use state whenever we're thinking about managing 13 00:00:38,830 --> 00:00:45,820 a single value of state now technically this counter example is not really a good place to use a reducer 14 00:00:46,060 --> 00:00:48,630 using the you state hook is definitely ideal. 15 00:00:48,700 --> 00:00:51,520 Nonetheless it is a pretty straightforward example of state. 16 00:00:51,520 --> 00:00:55,950 And so it'd be a good place to just practice setting up the use reducer hook. 17 00:00:55,960 --> 00:01:00,640 So even though it's not super ideal Hey give it a shot anyways as usual if you don't want to do this 18 00:01:00,640 --> 00:01:05,440 exercise don't sweat it just skip to the next video and we'll go over a very quick solution together 19 00:01:05,920 --> 00:01:10,060 we've really taken a look at reduces once so I promise I'm not going to make you struggle through like 20 00:01:10,300 --> 00:01:15,550 a 15 minute video again as we refactor that component so give it a shot and I'll see you in just a moment.