Dealing with Different Kinds of Actions
Learn how to add different actions using union and some TypeScript features.
We'll cover the following
Adding the Reset
action
Earlier, we hinted that we might add a third type of action: the ability to Reset
the counter back to zero. This action is much like the actions we saw at the beginning. It doesn’t need a payload. However, it might be tempting to do something like this:
Get hands-on with 1400+ tech skills courses.