Building a Counter UI by Composing Callbacks

InstructorJohn Lindquist

Share this video with your friends

Send Tweet

We've written a lot of code up to this point, but let's take a step back and try a demo from scratch to help see the pattern evolve. This lesson walks through creating a counter demo which can add a number when you click an add button or subtract number when you click a subtract button.

Count the number of reusable function that were created in this lesson compared to writing this with nested callbacks