Patricio Vargas
Software Engineer
what is state?
Set of reactive libraries for Agular.
NgRx = Redux patter + Angular
-there is state everywhere
-getting data again and again
-notify everyone
when you app is simple
the team is new to angular
you team has a good pattern
Redux is a predictable state container for javascript apps
-Single source of truth called the store
-State is read only and only changed by dispatching atcions
-changes are made using pure functions called reducers
is a single source of truth
what should not go in the store?
-nshared state
-angular form state
-non-serializable state
login actions
toggle side menu
retrive data actions when initializing a component
start a global spinner action when saving data
user reducers to change the state
-reudcers is a pure function
what is a pure function?
pure and impure fucntiosn
pure function screenshot
Advantages of Redux
-Centralized immutable state
-Performance
-testability
-tooling
-component comunication
By Patricio Vargas