reactjs101 icon indicating copy to clipboard operation
reactjs101 copied to clipboard

CH07/08 - Is the combine reducer missing the 'todo' key for todoReducer?

Open nickkfwong opened this issue 8 years ago • 1 comments

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']) } }

nickkfwong avatar Jan 01 '17 16:01 nickkfwong

If you use ES6, you can use the Enhanced Object Literals. thanks :) https://babeljs.io/learn-es2015/#ecmascript-2015-features-enhanced-object-literals

kdchang avatar Jan 05 '17 13:01 kdchang

Understood - Thanks ;-)

nickkfwong avatar May 15 '23 10:05 nickkfwong

您好,您的邮件已收到,谢谢~~~

qray90 avatar May 15 '23 10:05 qray90