Live data from Hacker News

React is winning by default and slowing innovation

lorenstew.art

621–630 of 866 posts

Re: React is winning by default and slowing innovation

#621
post #597
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…

I feel like you must have learned JavaScript and React concurrently to have a belief like this.

Nah, I started with vanilla, then jQuery, then finally learned React.

Re: React is winning by default and slowing innovation

#622
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…

off topic but react code is hard for LLM to edit for some reason compared to other like VueJS

Re: React is winning by default and slowing innovation

#623
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…

Sure this is js // React code here

    react.createElement(react.Fragment, /* React code here */)

Re: React is winning by default and slowing innovation

#624

I think this article discounts the reasons behind frontend decisions... priorities are absolutely fast execution time and ease of hiring. There is very, very little reason to care about optimizing frontend performance for a vast majority of apps. Users just don't care. It doesn't make the company more money. If a framework is easy to use and everyone knows it, it's simply the best choice for 90%+ of teams.

This isn't true at all if you're working on maintaining a web app. When ease of hiring and getting tasks done quickly have become the priority it's because the business has let too much work pile up. It has very little to do with the money unless it's a small startup.

Frontend skills are misunderstood by most of HN because it's a hard role that directly involves business and product wants. There's a ton of hiring (and firing) because it's not easy to find the right people who can communicate about the work clearly with non-devs, navigate the office politics, know what to push back on or when to ask questions, and still write good code.

Re: React is winning by default and slowing innovation

#626
post #438

Earlier quoted context omitted.

Also react in particular in combination with tailwind seems to be easier for LLMs to generate. Probably due to the condensed syntax, no split between code, css and html, plus the color naming scheme of tailwind.

LLMs favour React and Tailwind because they’re popular , so they’ve seen a lot of them, not because of technical merit. This is the very manifestation of React winning by default and slowing innovation.

Given the quality of some of that combo I’ve seen vomited out, it’s technical dismerit.

I wonder if you’re better off with something critical mass enough that an LLM can correctly write it at all but not trained on mountains and mountains of slop.

Re: React is winning by default and slowing innovation

#627
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…

Hard agree. I've used xml directives before, all the way back to Macromedia Flex (which I believe borrowed form something in the Java space, which probably borrowed from something else). I'll likely NEVER use anything that doesn't let me run JSX. My personal preference is for complexity at the start of the render pipeline (e.g. in state) or at the end (e.g, in JSX). So I personally dislike complex hooks composition,…

When I first saw JSX, I immediately thought I'd hate it. Then I jumped boat to React after years with AngularJs/Angular 2+ after hooks and functional components came in and to this day I still enjoy writing React. And I love JSx.

Re: React is winning by default and slowing innovation

#628
post #477

Earlier quoted context omitted.

In what way React is anywhere near well designed? Look over quick starts of React and Angular, for example. One is a well structured application , the other is a spaghetti script , all held by magic and conventions. If you recall the (in)famous "PHP: a fractal of bad design", React basically ticks every box in this rant and then some. It's not surprise knowing it's origins, but still. The reasons React has got tracti…

After working with both, React is massively more readable and easier to work with.

I guess it's all subjective, but I'll take learning a new Angular codebase over a React one any day of the week and twice on Sundays.

That's simply because you learn Angular once, and then you learn the half dozen things that can differ between projects, and then you know how it works. For React, every project has its own stack and conventions.

I probably won't disagree that the ceiling for a good React project is higher than that for a good Angular project, simply because you have more freedom to make good decisions. But in the same vein, you also have more freedom to make bad decisions, and most people tend not to be very good at making these kinds of decisions.

Re: React is winning by default and slowing innovation

#629

Earlier quoted context omitted.

Then why dont you pick jquery? Its easy and well known, even now. The answer I see is that react is technically good enough. Using boring technology doesnt mean using the technically most advanced thing. It means picking something safe and stable.

Why would you need jquery today? What can it do that native browser APIs can't?

Jquery didn't provide anything that you couldn't already do with native browser APIs, it was a wrapper around those APIs.

Re: React is winning by default and slowing innovation

#630

I feel this with every fiber of my being. I used to do a TON of front-end work, some of it quite cutting edge, delivering highly performant user experiences in the browser that had previously been only thought possible in a native app. Back in like 2009-2015. I was deeply connected with the web standards fundamentals and how to leverage them mostly directly. I detoured into heavier focus on backend work for quite a w…

> It just basically does everything React does but better SolidJS still has some major pain points; the one I found was not knowing whether a prop was a signal or needed to become one. The type system doesn't help much. In React, you know for sure that if your reference changes, the component reading that reference as a prop will re-render. In Solid, it's less clear whether the update will be observed.

> In React, you know for sure that if your reference changes, the component reading that reference as a prop will re-render.

Amen. Data flows down. That, to me, is one of React's biggest strengths.

Post reply on HN