Loving riot js but why is "Hello 0" not incrementing on the page in the following code example, and what is the workaround for now?
<my-app>
<p>Hello {myNumber}</p>
this.myNumber = 0;
var thisApp = this;
setInterval(
function(){
thisApp.myNumber++;
},
1000
);
</my-app>
Inside the function add
thisApp.update();
There is no way to add and configure dirty checking in riot js, as of version 2.2.2-beta.
You don't need to call update()
in the execution of your
...because riot js automatically calls update()
after executing those.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With