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 editable attribute to the counter called multiplier. It will be a number and later we'll use it to multiply the current count. Make it a number, and give it a minimum value of 1, and a max of 10. Make sure it's editable in the Appmaker designer and that the value persists when saving your app.
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.