Live data from Hacker News

React vs. Backbone in 2025

backbonenotbad.hyperclay.com

241–245 of 245 posts

Re: React vs. Backbone in 2025

#241

Earlier quoted context omitted.

There are essentially infinitely many JS frameworks. You’ll have to recommend one or two to be taken seriously.

Vue.js is better react without hooks bullshit and with actual reactivity. Very nice, stable and mature.

I too prefer Vue over React. I still haven't checked out Svelte, and I'm completely over Angular by now.

React looked great when I first used it for something really small. It looked horrific when I used it on a massive project with ridiculous amounts of data and tons of middleware. Although the real horror was the useEffect spaghetti. Vue keeps looking reasonable in every project I encounter it in. Even when people use it poorly, it's never Vue itself that's the problem. Well, maybe when people start working around the reactivity. That can get really bad.

Re: React vs. Backbone in 2025

#242
post #92

Earlier quoted context omitted.

You can actually further simplify the functional component by using setState's callback form. You don't always need to do this, but it makes setting state from within a useEffect much safer in that it won't need the current state value in its dependency array. const handleAgeChange = setAge((prevAge) => prevAge + 1);

That's wrong, it's calling setAge immediately and not making a callback. You'll get an infinite render loop from that. It should be: const handleAgeChange = () => setAge((prevAge) => prevAge + 1); https://react.dev/reference/react/useState#updating-state-ba... The callback version is really only needed if there's a risk of setAge being called multiple times between renders and you do actually want all the mutations,…

Ah this is what I get for trying to write code on my phone. I'm specifically thinking of cases within useEffects, where the state setter is constant between renders but the state itself is not, so you can wind up with an infinite re-render once the state has changed once, unless you check the state inside the useEffect before calling setState.

Re: React vs. Backbone in 2025

#243
post #110

I've come to the opinion that for the vast majority of apps I've built, it could all be built using HTML + CSS (all built server side). I can sprinkle in little bits of interactivity using something like HTMX. And I'll have a website that is very easy to optimise, has phenomenal backwards compatibility, and gets rid of a whole class of issues associated with SPAs. I often regret in my career not pushing back more on…

No need for HTMX, HTMZ can get you most of the way there if it is going from simple MPA to slightly more complicated. I used a variation of HTMZ to make a offline-first soccer app I use for myself. I thought I would need to use a front end for the match play page, but, nope, I used Morphdom with HTMZ and I was able to keep the simplicity of templating and a back end.

[1]: https://github.com/jon49/htmz-be

[2]: https://github.com/jon49/Soccer

Re: React vs. Backbone in 2025

#244
post #78

I think the broader point being made here isn’t “React is bad” it’s how far we haven’t come in all this time. The user experience on the web is still sorely lacking. To be sure some of it is a result of still missing browser primitives for e.g. performant scroll table views but there have been a lot of developments very few capitalise on. For example: one of the big benefits of apps vs the web is that you download th…

I build most of my personal websites with service workers. No need for the framework, I just build it for the specific use case I have at the moment.

Here's an offline-first soccer app: https://github.com/jon49/Soccer

And here's an MPA that caches the pages and save the updates for later when you are back online. So, you can navigate around and see the old data even if you are offline: https://github.com/jon49/cash

Re: React vs. Backbone in 2025

#245
post #227

There should be a name for the fallacy: "You don't need React to do therefore you don't need React". Let's just call it "the React fallacy" because everybody always picks on React. It's like judging a programming language based on the length of its Hello World program. The reason I use React for simple things is because I also use React for complex things which require it (or another framework of equivalent power), a…

Pray tell, what is it that only react can do that makes you "require" it?

Easily find people to hire that know the framework and a huge ecosystem of pre-made components and utilities. No other UI framework comes close.
Post reply on HN