This course has been updated! We now recommend you take the React and TypeScript, v2 course.

Check out a free preview of the full React and TypeScript course:
The "Reducers Exercise" Lesson is part of the full, React and TypeScript course featured in this preview video. Here's what you'd learn in this lesson:

Students are instructed to add a reducer instead of using state in the counter exercise.

Get Unlimited Access Now

Transcript from the "Reducers Exercise" Lesson

[00:00:00]
>> It's time for you to take a take a run at this. Again, if you're just locally in projects folder in the repo, there is a base of a project called counter for hooks that you can use. That was like we used in the last one, but you can basically use the same project.

[00:00:21] As well, there's also a clean spot in examples number 20, which is the incident kind of reducer exercise. Don't look at 21 cuz this is a solution. But you can go through and give it a shot, get some muscle memory in there, and just go and add some, add a reducer instead of using state for our counter.

[00:00:41] Yeah, it's simple, but actually won't be able to see something cool, cuz it'll go back to that question that just got asked about, different payload types. And we'll be able to see a kind of cool trick that we can do after as well. So why don't you go and get most of that kind of set up, and then we'll kind of look at it together shortly.