My initial state is,
export const initialState = fromJS({
current: {},
page: {
loading: false,
isFirstLoaded: false,
},
meta: {},
});
In My reducer, since I have defined the nested structure for page
,
state.setIn(['page', 'loading'], true);
works fine.
Since I haven't defined the nested structure for current
or meta
state.setIn(['current', 'status'], 'done')
throws an error 'Invalid keypath'
When I logged the state,
{
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
}