我有以下代码:
import configureMockStore from 'redux-mock-store';
const initialState = { someField: {} };
const mockStore = configureMockStore();
store = mockStore(initialState);
console.log("Store is: " + JSON.stringify(store));
console.log
打印:
Store is: {}
打印商店时为什么不显示someField
?
我没有正确地初始化它吗?
答案 0 :(得分:0)
尝试将JSON.stringify(store)
替换为JSON.stringify(store.getState())