Cause of the __hash function setter has been executed in stateUpdater: Middleware
we don't need to executed this __hash state update again in communicator middleware, i think it should be changed to
if (Global.Setter.functionSetter[modelName]) {
Object.keys(Global.Setter.functionSetter[modelName]).map((hash) => {
const setter = Global.Setter.functionSetter[modelName][hash];
// If we need to exclude executed `setter` from `stateUpdater`
// we should exclude `__hash` once __hash has been executed in `stateUpdatater` middleware.
if (setter && __hash !== hash) {
if (!setter.selector) {
setter.setState(Global.State[modelName]);
} else {
const newSelectorRef = setter.selector(Global.State[modelName]);
if (!shallowEqual(newSelectorRef, setter.selectorRef)) {
setter.selectorRef = newSelectorRef;
setter.setState(Global.State[modelName]);
}
}
}
});
}
Cause of the
__hash
function setter has been executed instateUpdater: Middleware
we don't need to executed this
__hash
state update again incommunicator
middleware, i think it should be changed to