You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, great library! I'm using it for a demo project and it has greatly simplified my codebase. In my dev build, I'm also using the leoasis/redux-immutable-state-invariant library to check for state mutations. I've found that your library can throw mutation warnings when adding/removing listeners.
I was able to resolve this in my local copy by modifying the reducer to do a deep copy when cloning the state:
// extracted from reducer.jsvar_lodash=require('lodash.foreach');var_cloneDeep=require('lodash.cloneDeep');var_lodash2=_interopRequireDefault(_lodash);var_cloneDeep2=_interopRequireDefault(_cloneDeep);exports.default=function(){// other code...// clone the state// var newState = Object.assign({}, state);varnewState=_cloneDeep2.default(state);// other code...};
May I create a PR for this change?
The text was updated successfully, but these errors were encountered:
Hello,
First off, great library! I'm using it for a demo project and it has greatly simplified my codebase. In my dev build, I'm also using the leoasis/redux-immutable-state-invariant library to check for state mutations. I've found that your library can throw mutation warnings when adding/removing listeners.
I was able to resolve this in my local copy by modifying the reducer to do a deep copy when cloning the state:
May I create a PR for this change?
The text was updated successfully, but these errors were encountered: