Do not use passed parameter 'state' directly.
doguhanokumus opened this issue · 1 comments
doguhanokumus commented
Line 6 in 7fcf5a4
You should use
let updatedState = Object.assign({}, state, {
key: value
});
return updatedState;
to update the state from a reducer.
The reason for this is that the referred object might be removed/changed while you are in the reducer and this might cause bugs.
cannc4 commented
Thanks for the tip. We're currently refactoring the code, will keep that in mind