Live data from Hacker News

UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

unsuckjs.com

11–20 of 194 posts

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#11

Looks great, love the list so thanks for putting it together. In an ideal world your table would also have a first commit row that way I can better compare how well established each library is (GitHub stars mostly does this but date of first commit would help give sense of momentum too)

I didn't post the site to HN, but I did create it. Adding the first commit is an interesting idea. Or some way to measure longevity (i.e. how long has the library been worked on). I'll try to figure out a good way to do that or if you put up a PR I will take a look at it: https://github.com/adamghill/unsuckjs.com.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#13

I can do the same thing via NextJS and output pure HTML and CSS without any JS at all. Or with server components, output only the minimal JS needed. Not sure why everyone wants to write a programming language inside HTML like lit does.

The king of "use JS frameworks, output pure HTML" is Astro. ( https://astro.build/ ) It's basically an SSG where you can use a number of frameworks to write your components, and shipping any JS is explicitly opt-in.

Astro is pretty nice too, I was going to write my blog with it but I liked the instant page transitions that NextJS provides out of the box for which I couldn't find a suitable solution in Astro.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#14

I can do the same thing via NextJS and output pure HTML and CSS without any JS at all. Or with server components, output only the minimal JS needed. Not sure why everyone wants to write a programming language inside HTML like lit does.

The king of "use JS frameworks, output pure HTML" is Astro. ( https://astro.build/ ) It's basically an SSG where you can use a number of frameworks to write your components, and shipping any JS is explicitly opt-in.

Why Astro instead of say, Svelte?

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#15

I get these for when your stack contains python/go/ruby and your page is SSR. But more recently I've just come to enjoy the full blown Javascript Framework. I use Svelte exclusively, and the bundle sizes aren't too large thanks to the compiler. I can write TS which is way more comfortable than JS or even Python or Go IMO.

Yep.

Myself I am working with HTMX and thinking about how the back end framework changes to make the most of HTMX.

For instance I have a screen that has a bunch of dropdown inputs that automatically post changes to the server when you flip them and sometimes the options change when you flip them. The dropdown is defined in a macro that can be used in a template or that can be directly sent to the server. HTMX also can update several things in one request: for instance when I add a new RSS feed to YOShInOn it has to (1) insert the item into the feed, (2) tear down a modal dialog, and (3) update the count of the number of feeds. You very much need a server-side framework that makes it routine to do all that.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#17

What's great about Mithril is that is squeezes a router in that tiny size. None of the others have that I imagine. If you do need a full blown single page app, Mithril takes care of it all.

Yes! I don't think Mithril gets enough attention. It's my go to JS framework when I need more than Vanilla JS but don't need something like React.

Why would you ever need React over Mithril?

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#18
The bottom row of the table is "IE11 Compatible".

...IE11 hasn't been relevant on the public-web for at least a decade now, and I'm fairly sure it's now entirely gone from corporate/enterprise situations now too, given MS' even-more-aggressive-than-usual campaign to kill it off in Feburary of this year: https://www.cnet.com/tech/services-and-software/rip-internet...

...why is that there? It's weird - it's like saying iPhone 14 is not compatible with 30-pin dock-connectors.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#19

The bottom row of the table is "IE11 Compatible". ...IE11 hasn't been relevant on the public-web for at least a decade now, and I'm fairly sure it's now entirely gone from corporate/enterprise situations now too, given MS' even-more-aggressive-than-usual campaign to kill it off in Feburary of this year: https://www.cnet.com/tech/services-and-software/rip-internet... ...why is that there? It's weird - it's like saying…

It's there because some libraries explicitly call it out as a benefit so I included it. The code is OSS (https://github.com/adamghill/unsuckjs.com) -- feel free to make a PR to be the change you want to see in the world.
Post reply on HN