- dis<P, S>(fn, defaultState): ((this: unknown, payload?: P) => S)
- Parameters- fn: ((state: S, payload: P) => S)- (state, payload): S
- Returns S
 
 
- defaultState: S
 
- Returns ((this: unknown, payload?: P) => S)- (this, payload?): S
- Parameters- this: unknown
- Optionalpayload: P
 
- Returns S
 
 
Redux like state reducer within diInit callback
Call it with value for state reducing
Call it without arguments for getting state
Example