Live data from Hacker News

A tale of webpage speed, or throwing away React

solovyov.net

151–160 of 319 posts

Re: A tale of webpage speed, or throwing away React

#151
Thought this was a good read - and nice to see the progression of frustration with front-end development throughout the last decade, and then the introduction of mobile. This is a pretty common timeline for web devs who have been doing this ~10+ years.

I wonder why the author did not contribute to intercooler rather than writing his own version. Would it really have been that difficult to avoid inheritance (or add an inheritance free api) and add batching to that library?

Re: A tale of webpage speed, or throwing away React

#153

Most people here are criticizing the author for doing some dumb things. I concur, but still think they have a good point. First, keep in mind that the author's use case is a content-heavy app with sprinkles of interactivity. This is very important because it sets the "webpage speed" goalpost to a concrete place: they want good lighthouse/first load times and good SEO. I've fallen into the same pit before. I've used C…

Wow, hello quantumly-entangled developer twin. All this Gatsby, Next, React hydration, multiple roots stuff is what I'm traversing at the moment. Even down to the `` example. I'm having discussions about these things almost every day. And then to finish it off, you mention the pit of success which has been a key focus of my recent attention too. I could imagine myself writing this exact post, even down to the word 'janky'. I had to check to see if you were a colleague of mine, but I doubt you are.

Since we're tackling similar problems, do get in touch with me if you want someone to share ideas with in future.

Re: A tale of webpage speed, or throwing away React

#154
post #151

Thought this was a good read - and nice to see the progression of frustration with front-end development throughout the last decade, and then the introduction of mobile. This is a pretty common timeline for web devs who have been doing this ~10+ years. I wonder why the author did not contribute to intercooler rather than writing his own version. Would it really have been that difficult to avoid inheritance (or add an…

Batching is doable. I even understand how to do it in htmx. The problem is that

1) htmx started later than I did

2) inheritance is like a plague, and I'd really want it to not exist

I'll try to explain my stance. When you're a developer, you naturally drift to solutions which require you to write less or write faster. And inheritance certainly helps with that in simple cases. TwinSpark had inheritance up until we tried to implement sign-up/in logic.

Damned popups... Anyway, that's the day we've killed inheritance: https://github.com/kasta-ua/twinspark-js/commit/5714ceea9836...

And if you have two APIs - with and without inheritance - developers will use the first one by default. And when it bites you it'll be painful.

So if Carson reads my rant and decides to remove inheritance - I'll gladly move to htmx. If not - maintaining a library which is less than a thousand lines of code is not that big of a burden. :)

Re: A tale of webpage speed, or throwing away React

#155
post #28

When I first read the haiku at the bottom of the HTMX homepage, I had a flash of insight. javascript fatigue: longing for a hypertext already in hand What are we doing? State management libraries? Hypermedia is the engine of application state. Send data to client as HTML and have the client apply styles over it, rather than converting from JSON to local objects and storing in some sort of reactive data store. You wil…

Agree, this is so true. I will give it a few years before we are all back on server rendered web apps.

Server-rendered web apps never went away. They are still extremely popular. The tech stacks have only diversified.

Re: A tale of webpage speed, or throwing away React

#156
post #83

> we’ve discovered that React also leads to some questionable practices. Like hovers in JS (rather than in CSS), drop-down menus in JS, not rendering hidden (under a hover) text (Google won’t be happy), weird complex logic (since it’s possible!), etc. This is some strange reasoning that I have yet to seen myself. If you can do the hovers states/drop down menus in CSS, why not do them in CSS, even if you're using Reac…

> dead-tree elimination The practice of removing unneeded code from a bundle using static analysis is commonly known as “tree-shaking”, but I like your version better. :D

Looks like "dead code elimination" is what this is generally called in compiler-land - another thing rediscovered in javascript-land and given its own name.

Re: A tale of webpage speed, or throwing away React

#157
post #151

Thought this was a good read - and nice to see the progression of frustration with front-end development throughout the last decade, and then the introduction of mobile. This is a pretty common timeline for web devs who have been doing this ~10+ years. I wonder why the author did not contribute to intercooler rather than writing his own version. Would it really have been that difficult to avoid inheritance (or add an…

Batching is doable. I even understand how to do it in htmx. The problem is that 1) htmx started later than I did 2) inheritance is like a plague, and I'd really want it to not exist I'll try to explain my stance. When you're a developer, you naturally drift to solutions which require you to write less or write faster. And inheritance certainly helps with that in simple cases. TwinSpark had inheritance up until we tri…

Nice thanks for the details - I didn't know you were in talks with them about changes to intercooler, too.

Nothing better than a nice pop-up to ruin your day... they're a different kind of plague

Re: A tale of webpage speed, or throwing away React

#158
> It supports only modern browsers (not IE or Opera Mini) but drops that 88kb monster.

Whenever I read this, I usually take it the author is being serious. However, how long does it actually take to load a 88kb library these days, is it really 'monstrous'? If this was the authors top performance drain based on profiling, I commend their technical abilities.

Re: A tale of webpage speed, or throwing away React

#159

Most people here are criticizing the author for doing some dumb things. I concur, but still think they have a good point. First, keep in mind that the author's use case is a content-heavy app with sprinkles of interactivity. This is very important because it sets the "webpage speed" goalpost to a concrete place: they want good lighthouse/first load times and good SEO. I've fallen into the same pit before. I've used C…

Kind of off topic but when the word "hydration" become a technology term? I see it all over and it's never really made sense to me. The definition is specific to fluid:

1 : to cause to take up or combine with water or the elements of water 2 : to supply with ample fluid or moisture

Maybe I'm old school but the word "populate" makes a lot more sense than hydrate when talking about data.

Re: A tale of webpage speed, or throwing away React

#160

The initial motivation for intercooler.js (which the author forked) was performance. I was working on a large bulk table update and building the table dynamically in javascript. The performance was terrible (this was back in 2012, no idea what it would be like today). I realized that I could just deliver and slam HTML into the DOM and that the browser engine, written in C, was very fast at rendering it. That turned i…

Wow, that's awesome! Would have definitely made some stuff I've done a lot easier.
Post reply on HN