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

450

u/ProfProfessorberg Jun 25 '21

I read this as 'switches FROM react TO angularjs' and I couldn't believe anyone would choose that...

52

u/nowtayneicangetinto Jun 25 '21 edited Jun 26 '21

AngularJS is ancient and such a pain in the ass to use no idea why they chose that.

45

u/LetterBoxSnatch Jun 25 '21 edited Jun 25 '21

We were an earlyish adopter to Teams, and I remember the tech landscape at the time. It was not as unreasonable as you might think at the time to choose AngularJS 1.x, which had a lot of cross-platform tooling for deployment including for mobile. It was "newish and good" but also "battled tested." From a management perspective, picking it probably made sense.

I happened to be working in an Angular 2+ shop at the time that we started using Teams. I remember being curious and using the dev tools to discover it was running Angular 1.7 or whatever. Anyway.

When Angular 2 came out it was obvious that it was like a totally different paradigm from Angular 1.x. Angular 2 was basically an opinionated React. React if all the React libraries were baked in. The funny thing is that the React community over the next few years would largely adopt the opinions that came baked into Angular, even going so far as to rally behind CRA. But Angular 2+ had so many baked in decisions and the wider community couldn't make heads or tails why they would make the choices that were being made, it was too much all at once...of course, there were some dumb decisions that Angular made, too, like special HTML templating while React had the much more intuitive and flexible JSX. I actually think that conceptually picking RxJS was a fantastic choice, but that RxJS itself is a stupidly complex implementation of reactivity model.

Anyway.

What seemed crazy to me even at the time was that they kept not updating...and not updating...and not updating. Teams adoption wasn't that high, but it was fairly feature complete, so why not switch to better tech? I can sort of understand, because it was a big jump to Angular 2+, and while Angular eventually had tooling to help make the transition from 1.x to 2, by the time that tooling came around, it was clear that React was "the new jQuery," and that the React ecosystem was a much better investment of time and resources.

EDIT: a sidenote perhaps of interest: we picked Teams because of the contractual and support implications vs its competitors. Probably would make that same choice today, honestly, despite it being a steaming pile

0

u/[deleted] Jun 26 '21

[deleted]

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.