3 ms·
I like the locality of behavior concept and am interested in learning more about hyperscript. This VanillaJS example is just plain silly. I've never seen anyon
by sequoia 5y ago
I like the locality of behavior concept and am interested in learning more about hyperscript.
This VanillaJS example is just plain silly. I've never seen anyone set styles and call requestAnimationFrame & do all that in an inline onClick handler. I mean html elements have a `style` attribute, why would you set `transition` in a click handler?
The vanilla example should look more like the jQuery one, with the the code apart from the markup & referencing the element by id or class, attaching a handler with addEventListener.
Your will still compare favorably, and this a slightly less "intentionally ugly" way to write the code.