A lot of the time, when you define logic in a component, you will want to reuse it in a few different places within your application as separate instances.
In this lesson, we will break out the logic of our
StopWatch Component and use two instances within our stopwatch and compare the difference between the two
Is there a reason for why you don't keep the reducer function local to useStopwatch? Just personal preference?
Just personal preference.
Thank you Kent for the wonderful lessons, however, when I click on the "View code for this lesson" button on some of the lessons, it shows
Not Found We could not find the sandbox you're looking for.