What are the pro and cons of using either pure Redux or ngrx with Angular2/4?
I have been using both in differenet projects but am still wondering which one is the most efficient and fastest.
It ends up that ngrx and Redux follows mostly the same ideas and help solving pretty much the same issues.
That said, angular uses Rxjs a lot, specially Observables, and as ngrx is also built upon Rxjs, the integration is a little bit easier and smoother
Regarding performance, if there is a component for which the entire state is in store, and the async pipe is used to output data to the view, you may use another change detection strategy for this component and this may lead to a performance improvement, specially on large applications. You may do it by setting changeDetection to ChangeDetectionStrategy.OnPush on @Component decorator. You may find more information on that here.
Also, on this thread you may find a detailed discussion on ngrx/store vs Redux.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With