Live data from Hacker News

React is winning by default and slowing innovation

lorenstew.art

491–500 of 866 posts

Re: React is winning by default and slowing innovation

#491
My theory: Browsers and js was evolving at such a fast rate that we needed a new frontend framework each year. React came with something good enough just as js and browser APIs started to slow down their massive changes and everybody was getting tired of changing framework all the time. Maybe some newer frameworks have some advantages, but not nearly enough to give up on what's now the standard ecosystem.

Re: React is winning by default and slowing innovation

#492
post #116

Earlier quoted context omitted.

I think (at least part of) the reason why React has been so successful is that is scales so well: it's actually a relatively simple tool that works well for small problems. Pair it with a Vite template or something and you can be up-and-running in minutes. But it continues working pretty well as your app gets bigger, too. But where React fails is actually in more complex scenarios. Prop drilling becomes tedious or in…

I think React can be approached a little like JavaScript at this point: just use the good parts! In my case that means using it as a rendering library and component composer, but not for managing state or side-effects.

Agreed. Like too much javascript, keeping in mind what it takes to get something running vs keeping it running is a consideration.

There are some fantastic rendering tools in React like Remotion.

Re: React is winning by default and slowing innovation

#493

Earlier quoted context omitted.

I think React can be approached a little like JavaScript at this point: just use the good parts! In my case that means using it as a rendering library and component composer, but not for managing state or side-effects.

This is exactly how I feel. I gave hooks a real, exclusive try for two years after they were introduced (2018-2020). I didn't like them—at all—so I went back to only using React as a UI library. I'm lucky enough now to work at a place where nobody else likes hooks either.

Appreciate the tips.

Re: React is winning by default and slowing innovation

#494

Earlier quoted context omitted.

The amazing thing about React to me is that millions of dollars keep flowing into improving its DX further. They have spent a lot of time building React Compiler ( https://react.dev/learn/react-compiler/introduction ) which does all the memoization for you! This severely lightens the performance concerns.

Sure, but Svelte and Vue have had these compilation features built-in for ages without all that money flowing in. The react team resisted these features because they went against their “it’s just a library” philosophy. They’re only copying them now because of how obviously useful they are in the other frameworks. useEffect, useMemo, useCallback etc. add a ton of complexity and make it easy to write buggy code. I used…

Vue and Svelte both feel like down stream evolutions in their own respective ways (and likely overlapping).

Re: React is winning by default and slowing innovation

#495
post #472

React isn’t just "winning by default" It's winning because at the core it's just JavaScript function composition. A component is a function, conditionals are `if (...) { ... } else { ... }`, loops are `map()`. JSX is just sugar for function calls. In Svelte you are writing XML with little JavaScript islands inside it. Instead of if you get `{#if}{:else}{/if}`. Thats not "ergonomic" – thats a mini-language stapled on…

> winning because at the core it's just JavaScript function composition

and now it's failing for the same exact reason, a pseudo "just js function" dsl (hooks) and all the magics enabled by special "compilers" and toolchain.

Re: React is winning by default and slowing innovation

#496

I've used React, Vue, Svelte and Solid. React is my far my least favourite of the four. Both before and after they added hooks, all the major API calls seem to have been designed for least intuitiveness. I really wish something else had won.

I'm with you on that one, React is by far the least productive of the lot and every single method it exposes to you has so many damned footguns it's fucking incredible, no wonder most people complain about slow React apps.

But to be fair to React, it's not entirely its fault. What it did when it came out really changed the paradigm for the better, without it we wouldn't have had component-based frameworks like Vue or Svelte today. It's just that, because of being backed by Meta, it has also far outlived its usefulness and has since been far surpassed by other frameworks that learned from its mistakes, but unfortunately for whatever reason no other framework has been able to usurp it. Anecdotally at least, I've noticed that there are some pretty large and important Vue codebases out there which makes me happy, so perhaps the tide will slowly start shifting and we'll start seeing the better frameworks win out at the end of the day.

Re: React is winning by default and slowing innovation

#497
post #439

I'm not a front end dev and only use JS stuff time to time for small personal project. There is so much JS framework out there that appear and disappear so fast. I don't know if we can call it innovation. I have the impression they just reinvent the wheel with so little value added. I prefer to keep on React at least it will not disappear the next time I will do some change on my project.

grug say ok to react

grug say react make complexity demon more powerful

> i blame developers for picking tools whose complexity is inappropriate for the problem they are solving

https://x.com/htmx_org/status/1967622941262168495

> > "mistakenly included a problematic object in its dependency array"

https://x.com/htmx_org/status/1967577321940165024

[both by the author of grugbrain.dev]

> react better for job and also some type application, but also you become alcolyte of complexity demon whether you like or no, sorry such is front end life

https://grugbrain.dev/

Re: React is winning by default and slowing innovation

#498
post #453
post #439

I'm not a front end dev and only use JS stuff time to time for small personal project. There is so much JS framework out there that appear and disappear so fast. I don't know if we can call it innovation. I have the impression they just reinvent the wheel with so little value added. I prefer to keep on React at least it will not disappear the next time I will do some change on my project.

My pet theory is that frontend devs have so little on the critical path, and are usually overqualified for the kind of work they do, that they keep reinventing these interesting paradigms for managing state in GUIs basically just so they can keep themselves entertained.

> My pet theory is that frontend devs have so little on the critical path.

Given that the frontend is the first thing users interact with, doesn’t that make it one of the most critical parts of the entire product experience?

Re: React is winning by default and slowing innovation

#499
post #472

React isn’t just "winning by default" It's winning because at the core it's just JavaScript function composition. A component is a function, conditionals are `if (...) { ... } else { ... }`, loops are `map()`. JSX is just sugar for function calls. In Svelte you are writing XML with little JavaScript islands inside it. Instead of if you get `{#if}{:else}{/if}`. Thats not "ergonomic" – thats a mini-language stapled on…

So JSX is pure Javascript and not, say, a dialect of XML embedded in JS? Because it sure looks like the former even though it compiles to the latter.

React isn't Javascript. It's a franken-language that looks superficially like a mix of JavaScript and XML whilst following the rules of neither. That's why there is such a thing as a React compiler - a good sign that you're not writing JS, which doesn't have compilers.

The other hint should be all the new rules you have to follow. React is full of magic syntax that looks like functions, but e.g. you can't call them inside an if statement, or you have to redundantly declare the 'dependencies' (variables you read) and so on. The semantics of React code are very different to imperative straight line code.

Re: React is winning by default and slowing innovation

#500

Switching to Svelte could be a massive W for a small organization, they'll get inundated with a flood of highly motivated, skilled ex-React developers. Also if react is as probablamitc as people say (I'm veteran of the Angular/Angular.js transition wars so i don't know whats going on as much). If svelt et co. it helps a business not only achieve greater speed but maintenability long-run it's a competative advantage a…

A lot of the issues stem from the fact that Meta was backing React for so long (before it got purchased by Vercel), so it always had a ton of resources dedicated to it which helped win the mindshare. It's like that saying, "No one ever got fired for picking Oracle" or however it goes.

The other frameworks (except for Angular) are simply too small when compared to the massive coffers backing React. I mean, Vue is by no means small at this point, there are hundreds of contributors and people are making good livings off of the donations Vue receives, but it's still nowhere near React levels where Meta's full-time salaried employees got paid to work on React. It's a blessing and a curse to be a FOSS framework like Vue.

Post reply on HN