top | item 30681908

(no title)

verifex | 4 years ago

Have you gone through both the React and Angular tutorials on each of their respective sites?

The angular one is far and away a much more detailed and useful tutorial than the React one. During the React tutorial on their site, I felt like I was being led by the nose towards competency and if I wasn't competent by the end it's my fault. Meanwhile the Angular one appears to give you some understanding of the angular concepts by the end.

At the end of the react tutorial, I feel confused and I'm still wondering what "hooks" are, as I haven't seen them mentioned once in the React tutorial. I tried your commands to setup a react site locally, and all I got was a web page showing React logo with a link to.. Reactjs... Meanwhile, the angular demo at least gives a little helping hand in building an app.

Your premise about poor decision-making is pretty spot on. I just wouldn't call React very accessible; As I'm definitely the target market for React and the process of starting the tutorial for React resulted in some NPM errors and a pretty useless demo site.

discuss

order

ameliaquining|4 years ago

For what it's worth, I had the opposite experience learning React vs. Angular from the official tutorials. In React, there was a particular mental model that the tutorial aims to convey, and once I got it things started making sense pretty quickly. Angular had just so many details, the motivation for which isn't obvious at first, which made it just a little too much at once and I wound up bouncing off.

There is a particular problem with the React docs at the moment, which is that they still haven't decided what to do about hooks. These were introduced as an entirely new API that was competing with the old class-based one that React developers were familiar with (i.e., they do the same thing, but in a different way). So the way they handled that was by leaving the old documentation using the old class-based API intact, but also made a whole separate section entirely about hooks and how to do things with them. (I wound up largely reading the two in parallel and ignoring the details of the older class-based API; I found hooks easier to learn for the above reason, that there are fewer different complicatedly-interacting details to try to figure out all at once.)

I can't imagine that the long-term plan is to just keep things like this, since it's so obviously suboptimal, but perhaps it's difficult to decide what exactly to do.

cehrlich|4 years ago

It’s a difficult situation. A new React project should obviously use functional components and hooks. But there are still large code bases that use class based components, and I don’t see that changing too soon, so it needs to be taught.

Imo the docs/guide should include all the old stuff, but at the end and with a big warning saying “here’s the legacy stuff”.

dimgl|4 years ago

After working with Angular 1.x for four years in the beginning of my career, I have very little appetite for Angular. And a detailed tutorial is only half the battle IMO.

The last time I attempted to use Angular 2, which was around 2016-2018 (don't remember the exact date) I just couldn't wrap my head around the new mental model: it wasn't Angular 1.x, but it also wasn't React. It used TypeScript and TypeScript decorators, and to me that seemed really heavy handed. I also wasn't used to the mental model of "use the CLI to scaffold files" such as models and controllers, and all of that really turned me off.

Nowadays things look a bit different. TypeScript has significantly improved and it really is a pleasure to work with. I'm also open to different kinds of coding styles, so maybe I'll give it a shot. But honestly? React is ubiquitous at this point. And Remix and Next.js are far more interesting to me than Angular.