我的初始状态是,
export const initialState = fromJS({
current: {},
page: {
loading: false,
isFirstLoaded: false,
},
meta: {},
});
在我的减速器中,因为我已经定义了嵌套结构page
,
state.setIn(['page', 'loading'], true);
工作正常。
由于我没有为current
or定义嵌套结构meta
state.setIn(['current', 'status'], 'done')
引发错误“无效的密钥路径”
当我记录状态时,
{
current: {..with properties including status is there as object..},
page: Map, // <--- why this alone being as Immutable Map,
meta: {}, // <--- This is also being as plain object
}