←back to thread

306 points carlos-menezes | 1 comments | | HN request time: 0s | source
Show context
tjoff ◴[] No.41893322[source]
Industry will do absolutely anything, except making lightweight sites.

We had instant internet in the late 90s, if you were lucky enough to have a fast connection. The pages were small and there were barely any javascript. You can still find such fast loading lightweight pages today and the experience is almost surreal.

It feels like the page has completely loaded before you even released the mousebutton.

If only the user experience were better it might have been tolerable but we didn't get that either.

replies(6): >>41893360 #>>41893625 #>>41893919 #>>41894650 #>>41895649 #>>41896257 #
OtomotO ◴[] No.41893360[source]
I am currently de-javascripting a React app of some project I am working on.

It's a blast. It's faster and way more resilient. No more state desync between frontend and backend.

I admit there is a minimum of javascript (currently a few hundred lines) for convenience.

I'll add a bit more to add the illusion this is still a SPA.

I'll kill about 40k lines of React that way and about 20k lines of Kotlin.

I'll have to rewrite about 30k lines of backend code though.

Still, I love it.

replies(3): >>41893417 #>>41893847 #>>41904214 #
pushupentry1219 ◴[] No.41893847[source]
Honestly I used to be on the strict noscript JavaScript hate train.

But if your site works fast. Loads fast. With _a little_ JS that actually improves the functionality+usability in? I think that's completely fine. Minimal JS for the win.

replies(3): >>41893980 #>>41894499 #>>41894626 #
starspangled ◴[] No.41894499[source]
What do you use that good javascipt for? And what is the excessive stuff that causes slowness and bloat? I'm not a web programmer, just curious.
replies(2): >>41895569 #>>41895617 #
1. _heimdall ◴[] No.41895617[source]
My rule of thumb is to render HTML where the state actually lives.

In a huge majority of cases I come across that is on the server. Some things really are client-side only though, think temporary state responding to user interactions.

Either way I also try really hard to make sure the UI is at least functional without JS. There are times that isn't possible, but those are pretty rare in my experience.