Closed onedesert closed 7 years ago
I get an initialState from my reducer and const newState = Object.assign({}, initialState)
then modify newState
as needed. Some deepCopy
function could achieve the same, better too because Object.assign only copies top level.
It is implemented with https://github.com/redux-things/redux-actions-assertions-js/pull/3 So we can use it. But it still needs to be documented.
Allow also to extend the initial state, otherwise you are force to create the full initial state each time you want a particular change on it.