No problem artydev. You can of course always fall back on a library when you have a lot of re-rendering going on. I believe that to make the right decision you need to understand what is going on under the hood. There are a lot of tutorials on diffing and VDom to be found on the internet for those interested.
You are absolutely right. artydev and Matt Kimek started a discussion about optimization. I just hooked in to that. Your post was about handling state in vanilla javascript and you did a good job on that.
No problem artydev. You can of course always fall back on a library when you have a lot of re-rendering going on. I believe that to make the right decision you need to understand what is going on under the hood. There are a lot of tutorials on diffing and VDom to be found on the internet for those interested.
Hi there Viridi. Thanks for your input.
But optimising and moving all the elements to HTML wasn't the point of this article
Hi Vijay Pushkin,
You are absolutely right. artydev and Matt Kimek started a discussion about optimization. I just hooked in to that. Your post was about handling state in vanilla javascript and you did a good job on that.
And only for the pleasure , here is a case when using a library worth it :-)
You can test it here :
MulipleCounters