There are several ways of handling state in Angular
- Using Angular Change Detection Strategy
- Implement Rxjs library
- Using third party library like ngrx or angular redux
Change Detection Strategy :
Angular by default uses the change detection using @input and@output decorators through which state can be handled if components have parent child relationships.
But using default change detection the components checks those changes everytime if event or some thing changed in components.
We come across many scenarios where we would like to do the change on condition basis which could improve the performance of an application.
No comments:
Post a Comment