Summary: Rewrite the
useAnimatedCounterfrom the previous exercise such that you can add additional function aside from the default behavior to the components. Use the
Create an animated clap counter that also changes the page theme when reset, and changes the primary color of the page when "clapped", and other interesting things that you want.
The technique here is to create a
callAll takes an arbitrary number of functions as arguments, and returns a
function that takes an arbitrary number of arguments, and for each function, calls that function
with those arguments. Checkout the example code below.
callAll and the
Here's an example of how you can use it