Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Forgo ngrx and you're golden. Use raw rxjs instead. If you have to use a statemachine crutch, use Akita.
-
@anup-dhabarde
I don't qualify "better." I focus on appropriateness.
I don't support Redux, regardless of the platform. You bake your application's entire state logic, regardless of level, into a single construct, and then give your components awareness of those same functions and state abstraction. Tight coupling is poor design, defeats chunking by creating shared dependencies, and obscures update behavior.
With RxJs, there's no need for an additional dependency. You'll remain in-paradigm for Angular (RFP is the default, performance is dependent on it). You'll learn immutability in process while enjoying the benefits of an application that isn't drowning in memory pressure and unused data. You'll also increase reusability while maintaining a small package size, and will be able to link your state management and tombstoning to the component lifecycle.
tl;dr RxJs gives you control and is fundamental to Angular to the point where not knowing it means you don't know Angular. -
@SortOfTested i understand rxjs is the main part of angular. I meant to ask which one should i use akita, or ngrx. If i have to use state management.
-
@anup-dhabarde
Akita avoids the tight coupling of resolvers/reducers. It also has a more sane query model.
I still say you should use rxjs for state management. -
@SortOfTested how the hell you know so much about everything. I dont understand
Trying my hand on Angular with Ngrx. Wish me luck.
rant
javascript
ngrx
angular
rxjs