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.
UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
121–130 of 194 posts
Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
#122Nice 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.
Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
#123Now i despise all the frameworks & libraries and go vanilla 9/10.
Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
#124Great list! To the maintainer: Cloudflare is mangling your HTML and redacting lit's `@version` with `[email protected]`.
Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
#125I 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.
Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
#126Earlier 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.
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
#127There should be another row that which of these can be included as a standalone javascript lib in html instead of requiring NPM.
Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries
#128Earlier 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
> 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
#129Earlier 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.
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
#130Earlier 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`?