Live data from Hacker News

UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

unsuckjs.com

141–150 of 194 posts

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#141
post #130

Earlier quoted context omitted.

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?

I used to use Gatsby, but the non standard plugin system as well as forcing GraphQL (I use GQL in my own projects but it's just not necessary for a blog site for example, which Gatsby markets itself as being for) put me off Gatsby and onto NextJS, especially when NextJS introduced their static site rendering features. Now with server components, there doesn't seem to be a real need to use Gatsby anymore.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#143

Earlier quoted context omitted.

An installation of chrome is roughly 1,500mb. You realize that's mostly code that all needs to work right?

Yeah and an operating system has 10s of millions of lines of code. Does that mean everything else comes without a cost? Also point here is you got options for a much lighter framework, which you bluntly missed.

They probably didn't miss it, more likely haven't been impacted by the sheer number of dependencies in Next js. I know I haven't.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#144

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.

A fresh install of NextJS is roughly 150MB. You realise that's mostly code that all needs to work right?

And work it does!

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#145
post #134

Sort of unrelated but I find it ironic this website is written in Python. It's a single HTML page. Make it a static site and host it for free/low-cost on S3 or something. Why do you need to host this website on a server, use Docker, etc? My personal blog is a static site using Next.js, I pay $0 to host it on S3. To me this is less about simplicity and more about being anti JS ecosystem, and being different just to be…

Yep. Just today I was working on a project that I started as a simple set of forms with HTML, CSS, and light vanilla JS + jQuery which over time has naturally accreted a bespoke event-handler framework (really not a bad one, all things considered), wishing I had just done it in React from day 1. Now we are battling complexity every day to support a highly interactive app and we're going to have to try convince the client to give us some time to refactor for some breathing room.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#147
post #120

Earlier quoted context omitted.

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.

But wouldn’t you be happier if each and every component on the page paid the price of a full templating system?

No?

Oh yeah, I forgot that Web Components are a terrible idea that are only marginally successful because they can claim to be a “standard” when they’re not any more standard than any other JavaScript.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#148

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

There are a bunch of server side apps that turn JSX into static HTML with no JS. It’s just a template language that compiles into JS but you can do anything with it you could do with other template languages.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#149

Earlier quoted context omitted.

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.

But wouldn’t you be happier if each and every component on the page paid the price of a full templating system? No? Oh yeah, I forgot that Web Components are a terrible idea that are only marginally successful because they can claim to be a “standard” when they’re not any more standard than any other JavaScript.

I honestly don't know how WCs got through the standards process successfully, they're so bad.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#150

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…

Internet Explorer 11 is still supported in Windows Server 2022, which goes out of support in October 2031. It's also supported in Server 2016 and 2019. It's also supported in Windows 10 LTSC versions for large companies. IE 11 mode for Edge is also supported until at least 2029 on all currently in-support Windows operating systems. So it can be very relevant if you have legacy systems that still need to be maintained…

And McDonalds released a game about Grimace’s birthday for the Game Boy Color this week. It’s still not a relevant gaming platform for 99% of developers.
Post reply on HN