3 ms·
Yes, I'm sorry but that JavaScript example code is terrible. I realize this sounds harsh but truthfully, it made me immediately disregard the library. If this
by cerved 6y ago
Yes, I'm sorry but that JavaScript example code is terrible.
I realize this sounds harsh but truthfully, it made me immediately disregard the library. If this is how you would solve these issues in JavaScript I'm not taking you seriously.
The web API offers an elegant separation of content, style and logic and these examples are just stuffing everything into logic. Don't do this
- deniz-a 6y agoFor a trivial example like fading out, you're right, but if you want to make dynamically generated animations, hyperscript's features are very helpful (The Web Animations API is a boon, but browser support isn't there yet). Separation of HTML/CSS/JS doesn't always mean separation of concerns. Every application has a different definition of a "concern", and if it doesn't align with the separation between languages, you don't get decoupled code, you intensify the symptoms of tight coupling.