1
目前,我的redux设置(它利用Immutable.js的状态)完全按照需要运行。然而,终极版开发者工具扩展输出每当打开以下错误:Redux开发工具Chrome扩展Immutable.js导致错误
An error occurred in the reducer TypeError: n.withMutations is not a function
对于情况下,我使用redux-immutable其结合减速功能,好了,结合我反应过来,路由器Redux的减速机:
import { fromJS } from 'immutable';
import { LOCATION_CHANGE } from 'react-router-redux';
const initialState = fromJS({
locationBeforeTransitions: null,
});
export default (state = initialState, action) => {
if (action.type === LOCATION_CHANGE) {
return state.merge({
locationBeforeTransitions: action.payload,
});
}
return state;
};
和我的业务逻辑reducer。
更新:构建生产包w/webpack,在生产模式下测试应用程序(在docker容器中)以及再次以开发模式(在本地机器上没有docker)测试应用程序似乎解决了问题?奇...
这个问题是由下面的答案解决?你可以更新状态,或者在足够的情况下接受答案 – anoop