reactjs101
reactjs101 copied to clipboard
CH07/08 - Is the combine reducer missing the 'todo' key for todoReducer?
Im new to javascript, but I can only make it work after changing it to
const rootReducer = combineReducers({ 'todo': todoReducer });
I believe mapStateToProps(state) in TodoHeaderContainers is trying to query such key
function mapStateToProps(state){ return { todo: state.getIn(['todo', 'todo']) } }
If you use ES6, you can use the Enhanced Object Literals. thanks :) https://babeljs.io/learn-es2015/#ecmascript-2015-features-enhanced-object-literals
Understood - Thanks ;-)
您好,您的邮件已收到,谢谢~~~