In createReducer, why 2 nested functions instead of just 1?
Why (initialState) => (reducerMap) => (state = initialState, action) =>
instead of (initialState, reducerMap) => (state = initialState, action) =>?
As it's anyway always used as createReducer(…)({…}), right?
In createReducer, why 2 nested functions instead of just 1?
Why
(initialState) => (reducerMap) => (state = initialState, action) =>instead of
(initialState, reducerMap) => (state = initialState, action) =>?As it's anyway always used as
createReducer(…)({…}), right?