Repository navigation
Upgrade your Component
Alright, so you're ready to re-invent the counter huh? That time-tested, honored and proven foundation of many a firework app - and you think you can do better? Awesome! Let's get started...
Let's add an attribute to the counter called the multiplier. Later we'll make the counter broadcast it's count multiplied by this multiplier. It will be of type number. Make sure it's editable in the right-hand side editor.
Add a broadcast method to the Counter called times counted. We'll use it to broadcast the total number of incoming signals (count up, count down, reset etc.) that the counter has received.
Add a listener called "Double Count" that will multiply the the current count by the multiplier attribute that you added earlier.
Add a click event using the on-click shorthand and bind it to a method that broadcasts the current count.
Add a french translation for the Multiplier attribute that you added.