rereducer
Create declarative redux reducers without boilerplate.
Basic example:
;const INITIAL_COUNTER_STATE = 0; const counter = ; ;// => 0;// => 6
What if you want the same transformation for more than one action type?
;const INITIAL_COUNTER_STATE = 0; const counter = ; ;// => 0;// => 0
What if you need a more complex condition for a transformation?
;const INITIAL_COUNTER_STATE = 0; const whenSomethingSpeciallHappens = actiontype === 'SOMETHING_SPECIAL' && actionpayload === 'SPECIAL_INDEED' && state > 10; const counter = ; ;// => 1011;// => 10;// => 11
Credits to:
- @winkerVSbecks: For sharing good ideas and feedback about the API