我想知道如何在redux中设置store 的初始状态.我以https://github.com/reactjs/redux/blob/master/examples/todos-with-undo/reducers/index.js为例.我试图修改代码,使TODO有一个初始化的值.
const todoApp = combineReducers({
todos,
visibilityFilter
}, {
todos: [{id:123, text:'hello', completed: false}]
})
跟随doctor :http://redux.js.org/docs/api/createStore.html
但它不起作用,我也不知道为什么.