Remix.run Logo
jmcgough a day ago

> React didn’t win purely on technical merit

A sentence written by someone who clearly hasn't worked on a large Angular 1.x project.

johnfn a day ago | parent | next [-]

Yes, this is probably the wrongest statement. When React was launched, it was one in a pool of thousands of web frameworks. For any axis you want to claim that React won by "default", there was another framework that dominated React in that axis and lost anyways. Some frameworks had more resources and lost (Angular), some of which were more popular and lost (jQuery, Backbone), and some of which were even more hyped than React and lost (remember Meteor?).

React didn't win by default, it won because developers tried it and found it was better. It absolutely won on technical merit.

There's a bit of a question of whether React would still win on technical merit today, versus all the next-generation frameworks. I personally think it is still better than Svelte, Vue, etc, but I'm a bit of a React apologist.

Izkata 5 hours ago | parent | next [-]

> some of which were more popular and lost (jQuery, Backbone)

Don't forget about having a migration path. I don't know how common it was (or how messy it might be, I never did this myself), but before Redux became popular, people were using Backbone models as the datastore for React. So existing Backbone-based apps had a way to piecemeal migrate to React.

rmunn 14 hours ago | parent | prev | next [-]

Upvoted despite your final sentence being incorrect. :-) You're absolutely right that React is miles better than Angular, but Svelte and Vue (which feel very similar to each other, I just switched from one project written in Svelte to a different project written in Vue and a lot of my knowledge is carrying over) are quite a lot easier than React. When I write in React I have to think about the hooks and when I'm initializing them; when I write in Svelte or Vue the $state/ref() systems just work and I don't have to think about them. I can even initialize a $state inside an if block if I need to; I admit I'm no React expert, so I should ask you. If you needed to create a piece of state inside an if block in React, how would you do it? Is the only answer "Move the hook call outside the if block, and just don't use it if the if block doesn't run"?

machiaweliczny 37 minutes ago | parent [-]

That someone can initialize a state in if block is not something good. React won with Angular 1.0 because noobs abused two-way binding making fking mess everywhere. Now in react they abuse useEffect but it’s a bit easier to control. I work currently in Svelte and never use 2-way binding and are careful to package state mgmt well but I like it. It’s similar to react with mobx but more performant although has no good component libraries. SvelteKit is also generally fine

ipaddr 20 hours ago | parent | prev [-]

It won by marketing and the angularjs to Angular breaking change. If they kept going with angularjs or had an upgrade path react wouldn't be default in the enterprise stack. That's all on Google.

Meteor was node framework. jQuery is probably still more popular but it is only a lib. Vue had a Chinese language problem.

React won because a framework by Facebook felt safe.

johnfn 20 hours ago | parent | next [-]

If every other framework failed because of <insert reason here>, that does indeed sound like React won due to its own merits.

oofbey 20 hours ago | parent | prev [-]

Google's incapable of sticking to anything good. Nobody gets promoted at Google maintaining a system. So somebody inevitably gets the idea to make a 2.0 which isn't backwards compatible, enabling them to do all sorts of bold promotion-worthy innovation. And inevitably 2.0 isn't very good. Even worse, it makes the entire ecosystem confusing and unhealthy.

RussianCow a day ago | parent | prev | next [-]

This. React was incredibly innovative at a time where the alternatives were some combination of:

* Two-way data binding spaghetti

* Boilerplate-heavy reactivity

* Opaque, framework-specific magic

* Manual state updates/transitions

React didn't win "by default" (whatever that means), it won because it was better than most of the other options at the time.

I agree that, on purely technical grounds, it isn't as strong of a framework as other competitors anymore, but React is and has always been Good Enough™ for most companies, to the point that it's not worth reaching for anything else most of the time. And I say this as someone who doesn't like most things about modern React.

andy_ppp a day ago | parent [-]

[flagged]

RussianCow a day ago | parent | next [-]

React was actually pretty simple in the early days. It's gotten significantly more complex because of hooks, suspense, SSR, and other features they've introduced more recently. But I would still take modern React over AngularJS 1 and I think it's far more explicit.

rimunroe a day ago | parent [-]

The source code for hooks when they were initially released was actually really straightforward too. It's been many years since I've read through other parts of the source code though.

AstroBen a day ago | parent | prev | next [-]

Yeah, that's where the complexity is supposed to be

johnfn a day ago | parent | prev [-]

All framework code has magic in it. But I posit that React uses magic internally so that we can write magic-free code. It's like how the Rust compiler contains unsafe code.

magundu a day ago | parent | prev | next [-]

You are 100% right. Maintaining angular.js for large scale app is pain.

sitzkrieg a day ago | parent | prev | next [-]

here here, being involved with porting a huge angular 1 project to the first angular2 RCs (golden dev choice) was the worst frontend project i ever witnessed in my not short career :-)

spoiler a day ago | parent | next [-]

I'm working with a large Angular app, and my dev experience has been abysmal. TS language server running out of memory, Angular language server frequently crashes or freezes leaving weird half line diagnostics in its wake. Go to definitions are so slow in the proje too.

I've worked on 2x, if not 3x larger React codebase without these issues. I can't tell a single instance where language tooling was failing me so severely that I've contemplated turning it off because it's creating more uncertainty than its helping.

I'm relatively new to Angular 20 itself—only used Angular 1, and also migrated that project to React. So I'm not yet qualified to make big statements about it (but a preliminary gut feeling is that it often feels complex in the wrong places). C'est la vie though

sitzkrieg 21 hours ago | parent [-]

i wasn't on the project for the entirety, but i certainly remember the new ng tooling getting heavier and heavier. once the apis settled down a bit people really started cranking uis out though

agos 4 hours ago | parent | prev [-]

Same here. I started learning React when the official angular way of migrating gradually didn’t work at all on my code base, while I was able to use a “react in angular” thing to migrate components one by one. Crazy times

teaearlgraycold a day ago | parent | prev | next [-]

If React is guilty of anything it’s being the first framework that was good enough to last a long time. Of course today we have hindsight and can make better alternatives. But replacing React at this point is harder because it’s been around for long enough that it’s become the standard.

Marazan 20 hours ago | parent | prev | next [-]

I cannot upvote this comment enough.

I am so glad to be old and have lived through the transition from Angular to React. To understand why we have React. In fact I am so old I have lived through the transition from Adobe Flex to Javascript Frameworks first.

And the thing that is clear to me is that wave of Javascript Frameworks, of which Angular was one, looked at Flex and leanred all the wrong lessons (I'm looking at you two-way data binding) whilst React got second mover advantage and learnt all the right lessons.

scotty79 a day ago | parent | prev | next [-]

Yeah, transcluded scopes and myriad of ad-hoc micro DSLs, one per each HTML attribute that needed any kind of smartness. And dependency injection to micromanage.

Fun times.

0x457 a day ago | parent | prev | next [-]

Well, that's just argument against angular 1.x

jmcgough a day ago | parent [-]

Yes, but when React launched, 1.x was its main competition. We started to incorporate React into parts of our app that needed better performance, and found ourselves using it for essentially all our new projects. It was quick to pick up, made apps easier to reason about, and had much more performant DOM updates. Angular's two-way binding made for flashy demos, but quickly became a leaky abstraction for complex pages with lots of updates.

That was in 2013. Angular 2 came out in 2016, and by that point React had won. Have had to dabble in other frameworks since then, and none of them seem to do anything significantly better than React. I spent my early career learning a new FE framework every year, at this point I'm happy to have something boring that does what I need and has a great ecosystem around it.

darepublic a day ago | parent | prev | next [-]

I remember the space being backbone (+ marionette!), and angular 1. webpack was a cool new confusing thing. enter react (with the mysterious redux). Purists said one should only use redux state and never local component state or context. Don't use refs! Don't you try to touch the dom! also jquery. my beautiful jquery. betrayed by the community, and cast out.

OtherShrezzing 21 hours ago | parent | prev [-]

I always thought Angular 1.x was _fine_, so long as you had incredible discipline in your team and stuck to predefined patterns.

React’s main benefit wasn’t technical, it was organisational. It’s so opinionated that it’s difficult for an incompetent developer to introduce very low quality code into the project. Meanwhile in AngularJS, a developer with a clever implementation idea was a terrifying prospect for future productivity.

lbreakjai 20 hours ago | parent [-]

React's benefit was absolutely technical. Its component model and one-way data binding was so much simpler to reason about and elegant than Angular. So much so that they ended up copying it in Aungular 1.6 and Angular 2.x.

One of the biggest criticisms at the time (And perhaps still now) was that it wasn't opinionated at all. It didn't make assumptions as to how to do routing, or to fetch data, or to handle state. The community eventually converged towards a handful of solutions, like redux, but it was easy for each project to have its own combination of flavours and patterns.

Angular was an all-batteries-included MVC framework, with DI, testing framework, and one true way to do things. The reason why it's harder to introduce very low quality code in React is because React is just functions, returning JSX, executing when the function parameters change.

On the other hand, angular had comically large footguns due to its very high complexity. Have a look at the legacy documentation, the page about "scopes" by itself is longer and introduces more concepts than the entire "Thinking in react" page.

Izkata 5 hours ago | parent [-]

> One of the biggest criticisms at the time (And perhaps still now) was that it wasn't opinionated at all. It didn't make assumptions as to how to do routing, or to fetch data, or to handle state. The community eventually converged towards a handful of solutions, like redux, but it was easy for each project to have its own combination of flavours and patterns.

> Angular was an all-batteries-included MVC framework

As said back then, React is just the "V" in "MVC".