mapStateToProps未初始化状态

时间:2019-02-12 20:05:41

标签: reactjs redux react-redux

我正在使用https://github.com/Microsoft/redux-dynamic-modules/tree/master/packages/todo-example 但运行后显示以下错误:

src/containers/root/FilterLink.js:6
TypeError: Cannot read property 'visibilityFilter' of undefined

const mapStateToProps = (state, ownProps) => ({
   active: ownProps.filter === state.root.visibilityFilter,
});

我在项目中使用redux-dynamic-modules包时也出现了同样的错误。

0 个答案:

没有答案