Current section: State Reducer 30 exercises
Problem

Default State Reducer

Loading exercise

Transcript

00:00 So there's something that doesn't quite sit right with me, and that is that the users of our use toggle are basically re-implementing most of the logic of our toggle reducer. And our toggle component's not all that complicated, but if it was really complicated, then there's a lot that they're gonna be re-implementing themselves,

00:17 and just not a super fan of that. So the solution's actually way, way easy, and that is what you're going to be implementing in this exercise. Being able to share logic is, you know, tale as old as time in programming. So you're gonna export the toggle reducer and then use it directly in here. That's it.

00:37 That's the solution. Spoiler alert. So have a good time with that. We'll see you when you're done.