Live data from Hacker News

UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

unsuckjs.com

121–130 of 194 posts

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#121

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.

Haven‘t heard of it yet. Sounds exactly like what i needed many times lately. Thanks!

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#122

Nice to see sprae on there it's handy when you want reactivity with minimal fuss. I would lobby for featuring Webreflection's uhtml it is a workhorse for me personally.

Thanks for the recommendation! I'll add it to the list as soon as possible.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#123
I love that so many here share the sentiment. I never liked reactjs. Started to use vue for almost all frontend needs. But even knowing what i do, it‘s way too much tooling just to get started.

Now i despise all the frameworks & libraries and go vanilla 9/10.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#125
post #120

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.

You can use lit components within Next, or within anything really. If you’re building a single app, use what you’re comfortable with. At my job, we’re often creating components that need to be used within an increasing number of frameworks because every client is using something different. Having a custom element instead of needing to load React on every client’s website is huge.

Interesting, at the workplaces I've been at, we only used React, nothing else, in order to make the code-sharing problem much easier, as well as not have developers learning many different frameworks just to get work done.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#126

Earlier quoted context omitted.

Not requiring NPM was one of my original requirements for anything on this list. All of these libraries should be available from HTML directly -- let me know or make a PR if that isn't the case.

I looked at the first one on the list "lit" and the very first thing it says on github is to install via npm.

That's because the vast majority of the JS ecosystem installs libraries via npm.

We can't really put all of the different ways to use Lit on the front page, but we document how to use Lit from a CDN right on the getting started page: https://lit.dev/docs/getting-started/#use-bundles

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#128

Earlier quoted context omitted.

How is Lit's use of JS in templates any different than JSX? Both use JS for expressions and control-flow.

JSX is expensive than JS, because JSX first needs to become JS, then other things happen

That doesn't speak to this comment:

> Not sure why everyone wants to write a programming language inside HTML like lit does

When that's exactly what the OP's suggestion of React does.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#129

Earlier quoted context omitted.

Not requiring NPM was one of my original requirements for anything on this list. All of these libraries should be available from HTML directly -- let me know or make a PR if that isn't the case.

I looked at the first one on the list "lit" and the very first thing it says on github is to install via npm.

If you read the documentation, you’ll find these links:

Core - https://cdn.jsdelivr.net/gh/lit/dist@2/core/lit-core.min.js

All - https://cdn.jsdelivr.net/gh/lit/dist@2/all/lit-all.min.js

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#130

Earlier quoted context omitted.

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.

Doesn’t NextJS do that with client-side JS though? I recently moved from Gatsby, which did that — and the transitions sure are instantaneous — to Astro, which outputs plain HTML pages. Each navigation is a request to the server. Yeah, they take a touch longer. But the response is tiny. You could always `preload`?

Could you explain a bit what you do like/don't like about Gatsby compared to Astro?
Post reply on HN