DEV Community

Discussion on: The best way to learn React is.. to learn Angular?!

 
giovanniincammicia profile image
Giovanni Incammicia

I've used React with both vanilla Javascript and Typescript. My opinion on that is that with Typescript you don't have to worry about static type errors. It's just another thing off your mind. And kind of forces you to design more because you have to think in advance what kind of data you have/receive. So yes, it really helps with maintainability. Also, it's easier for other people to read through your code and know instantly if that prop is supposed to be a string, a number or both.

I don't know much about Angular, but what I know is that it has more of a horizontal structure, compared to the tree-like structure of React. This means that in Angular you have a few folders with many files, while in React is easier to work with many folders (one per component) with usually a lot of files within (js, styles, tests, reducers for state-management, schemas and types, API calls and so on).
Of course, in either of them, you can structure the folders as you most like them. But usually, you wouldn't want to go against the way the library thinks.

I hope that makes sense! :D

Thread Thread
 
cadienvan profile image
Michael Di Prisco

I'll give my two cents on the thread: React is more "free" and, in my opinion, is less feasible for junior developers. Even if angular has a steeper learning curve, it provides structure, rules and linting, something you have to do yourself in React. That's the point of this topic: React is empowered by Angular, in some ways.

Thread Thread
 
giovanniincammicia profile image
Giovanni Incammicia

Absolutely agree. Many things done by create-react-app (mostly linting and structure rules) have probably been taken from Angular and frameworks from every language. I believe we could gain experience from every library/framework we learn and use it with the most appropriate for the project (or simply our favourite, in simpler cases :) )