redux-aggregate-immer
The helper module for redux-aggregate.
Below code be able to write more comfortable, with wrapImmer
.
const initialState = count: 0 nested: some: value: 'string' //// @ Mutations { return ...s count: scount + 1 } { return ...s count: scount - 1 } { return ...s nested: ...snested some: ...snestedsome value }const Mutations = increment decrement setNestedValue
Mutable mutations will be convert to immutable mutations. To be careful not to return state at those mutation.
//// @ with wrapImmer const initialState = count: 0 nested: some: value: 'string' //// @ Mutations for wrapImmer { scount++} { scount--} { snestedsomevalue = value}const Mutations =