Reputation: 1174
Can you tell me what is the difference between ng-redux vs ngrx-store library in angular? I want to implement redux in my application but not sure which library to use and what are the benefits?
Upvotes: 1
Views: 234
Reputation: 36
They both implement centralized state for your front-end, but I'd use ngrx/store for an Angular 2 app, because:
store
&& dispatcher
through RxJS methods like filter, transform data... I also thought it was nice having the Observable
pattern implemented uniformly for all my data logic. RxJS observables provide a more robust manner to interact with data related actions
select(key)
on the store module, which selects the specified state key and returns an observable that can be shared from a centralized service to multiple components; This minimized store subscription from components themselves and allowed for easy state updates from container(stateful)
to component(stateless)
leveraging Angular 2's change detection and async
pipe.Upvotes: 2