This is a brilliant list, I'm a particular fan of HTMX and Alpine.js. The move back towards small dependancy free JS libs, in combination with modern JS ES Modules, is absolutely brilliant. I learnt web dev back in the late 90s by doing "view source", and was still learning about new things that way well over a decade later. If we can move back towards that, by not having a build step, it will be amazing for new devs…
UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
191–194 of 194 posts
Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
#192Earlier quoted context omitted.
It sucks so much its unreal, forces OOP JS, which causes extreme amounts of boiler plate code and mutation bugs, making a simple change becomes a one week task. I'm just doing a complete rewrite of a legacy codebase made with TS, webcomponents and lit into a modern framework, which is about the only sane thing to do with it.
What's a mutation bug? In react, mutating a model is a bug. It's left up to the developer to remember not to do that. Outside of react, mutating a model seems like a natural fit for the way stuff actually works and it's not considered a bug.
Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
#193It would be handy to see the license. It's becoming increasingly more dangerous to use anything in the GPL family for anything but the narrowest of use cases. It's to the point that, even now, if it's GPL I refuse to incorporate it, even in personal projects. And I'm not against open source... Everything I write is MIT.
Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
#194Earlier quoted context omitted.
What if I want the website to work even when JavaScript is not turned on? I'd need a backend server and some frontend logic handling that case.
Not necessarily. It depends on what you need. For example suppose you were implementing an news reader with two panes. Left pane is a list of titles and previews, right pane is a full article for the selected item in the left pane. You can make the left pane a list of links to dedicated pages, and then add an htmx attribute to indicate that when the user has JavaScript to instead fetch a html snippet with just full a…