top | item 20044804

(no title)

antonkm | 6 years ago

I disagree. If you use create-react-app you get best practices out of the box.

React is also much less abstraction away from vanilla JS. Learning Angular is learning a new language with a whole bunch of restrictions. Learning React is like learning JS++.

(This is my personal experience based on three Angular projects and ten+ React projects.)

discuss

order

marfusios|6 years ago

Yea? What about routing, forms, state, styles encapsulation, code separation to modules, http clients, etc. A lot of choices for new React project, zero choices for Angular === faster startup.

hazza1|6 years ago

You don't need to choose the library but there's still the same amount of documentation to wade through, the amount of learning is the same.

although, code separation is native in React now and if you think http clients is still a thing you're too far into the Angular ecosystem to be helped.

antonkm|6 years ago

Forms: use HTML5 and expand on that. State: quick read, I'd say use context, hooks and effects if you're new. Styles: I despise style in JS, so I go with SCSS or CSS. The encapsulation problem is made up in 90% of all apps. Http: just use fetch. If you'd like, you can write a vanilla wrapper around it. Code separation to modules - don't get what you're going at really. Build functional components. Keep shared logic in services, a POJO wrapping functions and exporting it all.

ng12|6 years ago

From my experience, learning React and picking an approach for each of the above is faster than learning Angular.

netzone|6 years ago

I mean you get best practices for the small part React is focused on. Angular is a full type of ecosystem, like your Ruby on Railses, Djangoes etc. in which you can install it and then create a full website directly without any dependencies other than what you get.