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.js
var _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);
var newState = _cloneDeep2.default(state);
// other code...
};
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?