News for hackers. Stuff that matters.
Re:_hyperscript: A jQuery and JavaScript Alternative by cerved on Thursday April 22, 2021 @03:52AM (#26900005)
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

Re:_hyperscript: A jQuery and JavaScript Alternative by deniz-a on Thursday April 22, 2021 @06:03AM (#26900877)
For 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.