News for hackers. Stuff that matters.
Re:UnsuckJS: Progressively enhance HTML with lightweight Jav... by smusamashah on Thursday June 15, 2023 @02:14PM (#36344457)
There 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 Jav... by adparadox on Thursday June 15, 2023 @02:28PM (#36344637)
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.
Re:UnsuckJS: Progressively enhance HTML with lightweight Jav... by vxNsr on Thursday June 15, 2023 @02:44PM (#36344858)
Maybe you can add that somewhere in subtitle somehow? as it's not immediately clear
Re:UnsuckJS: Progressively enhance HTML with lightweight Jav... by adparadox on Thursday June 15, 2023 @03:43PM (#36345475)
Good idea! I'll add it to the subtitle.
Re:UnsuckJS: Progressively enhance HTML with lightweight Jav... by smusamashah on Thursday June 15, 2023 @05:08PM (#36346527)
I looked at the first one on the list "lit" and the very first thing it says on github is to install via npm.
Re:UnsuckJS: Progressively enhance HTML with lightweight Jav... by spankalee on Thursday June 15, 2023 @06:58PM (#36347956)
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 Jav... by hluska on Thursday June 15, 2023 @07:00PM (#36347990)
Re:UnsuckJS: Progressively enhance HTML with lightweight Jav... by spankalee on Thursday June 15, 2023 @02:27PM (#36344624)
For Lit, you can use pre-bundled versions from a CDN: https://lit.dev/docs/getting-started/#use-bundles
Re:UnsuckJS: Progressively enhance HTML with lightweight Jav... by robertoandred on Thursday June 15, 2023 @04:31PM (#36346104)
Which means any content would be rendered after page load, worsening performance compared to frameworks like Next.
Re:UnsuckJS: Progressively enhance HTML with lightweight Jav... by Zizizizz on Thursday June 15, 2023 @05:36PM (#36346851)
No it doesn't, for some of these at least you can render the page server side and the reactive components become reactive a bit later on, isn't that how next would work as well? It's a blend of server side and front end interactivity right?
Re:UnsuckJS: Progressively enhance HTML with lightweight Jav... by robertoandred on Thursday June 15, 2023 @05:53PM (#36347120)
You can’t render server side if you only use the library in a client-side script tag.
Re:UnsuckJS: Progressively enhance HTML with lightweight Jav... by Zizizizz on Friday June 16, 2023 @01:50AM (#36351973)
https://htmx.org so with this, the button will be there, but clicking on it might not do something until it's been fetched