r/reactjs • • Jun 25 '21

MS Teams switches to react from angularjs

https://twitter.com/rishmsft/status/1408085784016539653
711 Upvotes

113 comments sorted by

View all comments

Show parent comments

3

u/LetterBoxSnatch Jun 26 '21 edited Jun 26 '21

I never said anything about stealing anything from Angular. In fact, I think what actually happened is that significant portions of the React community eventually converged on many of the same choices. There is much greater diversity on the whole in the React community, and I think this is part of what’s special about the approach. With Angular, the decisions were made, many of which were excellent, but going against the grain was going to be painful. React allows continual experimentation and improvements by being unopinionated / decoupled.

Anyway, probably the biggest one was Angular being so bullish on TypeScript. But some of the other opinions that were baked into Angular that later came to seem like pretty normal choices in React (but certainly we’re not universally the correct choices) included:

  • CSS-in-JS

  • Router with a FP paradigm and event-sourcing model for history tracking

  • CLI tooling for scaffolding projects, with plug-in system for generative component code according to different needs

  • webpack

I remember there being a lot more to this feeling that Angular had a made a lot of pretty good choices, but tbh I don’t remember much more than what I’ve already written. I haven’t written much frontend code in the last two years, and have forgotten a lot of Angular at this point since these days I reach for React or uhtml.

Ultimately, I think that the real downfalls of Angular were: effectively having a DSL (a result of both the Angular HTML templates and the opaque use of typescript decorators for dependency injection), and that RxJS was an unfortunately complicated implementation of the Observer/Subscription model…a beautiful concept poorly executed (I like Flyd for this now)

1

u/ByteOfOrange Jul 06 '21

Angular allows CSS in JS? The separation of concerns thing is what's always kept me away from Angular but if that's true, it's a game changer for me.