DEV Community

Discussion on: First Impressions: learning Angular after React/Redux

Collapse
 
tomastrajan profile image
Tomas Trajan πŸ‡¨πŸ‡­

Hi Jen! Its always hard switching from one well known technology to other which works different, all the different patterns, idioms, approaches, community resources... It's a lot of stuff to process!

That being said many of the description of Angular in this article are imprecise or just incorrect which is easy to understand as the time spent with Angular vs React was considerably shorter ( i guess) and Angular was approached with Angular.js / React pre&existing know how which is not really that applicable.

eg: react does NOT have actions or reducers... Its the Redux library which provides these concepts...

Similarly Angular does not have actions or reducers but it has an NgRx library which is like upgraded redux.because it handles async and side-effects as first classconcepts

Wish you all the best on your learning journey

Collapse
 
neolefty profile image
Bill Baker • Edited

Bwahaha with useReducer(), vanilla React now has both actions and reducers. Watch out, tri-state area.

Collapse
 
jenc profile image
Jen Chan

πŸ˜‚πŸ˜‚πŸ˜‚

Collapse
 
jenc profile image
Jen Chan

I have yet to try writing a project in react with just JS. Hmmmm

Collapse
 
jenc profile image
Jen Chan • Edited

Hi Tomas, thanks for the thoughtful note. And yes good catch, actions and reducers are a Redux thing. In trying to compare like with like, the things I think are similar or different aren't actually there. It's such a stubborn thing to get used to one paradigm of module ecosystems, and certainly too easy for me to conflate the functionality of one set of tools with its availability in another. There's a lot that needs clarifying for sure.

Collapse
 
jefftopia profile image
Jeff • Edited

To build off Thomas’s comment, ngrx is a set of related redux libraries built with Angular in mind, but at the end of the day, it’s just another redux library.

I would say that the β€œservice & provider” approach you describe is not the best practice in Angular. Most articles I find recommend Redux for Angular just as they do for React.

NB: ngrx is fully compatible with React. It relies on RxJS observable, which work well with React’s...well, reactive, functional approach.

Thread Thread
 
theodesp profile image
Theofanis Despoudis

If only ngrx was more promoted in React tutorials...