TypeError: Cannot read property 'state' of undefined

https://github.com/reduxjs/redux/issues/2715

两个办法
1.https://zhuanlan.zhihu.com/p/86653939

2.将redux降级到3.7.2 是可以配套react16使用的

`
{
"name": "jianshu",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.18.0",
"immutable": "^3.8.2",
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-loadable": "^5.4.0",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-scripts": "1.1.4",
"react-transition-group": "^2.3.1",
"redux": "^3.7.2",
"redux-immutable": "^4.0.0",
"redux-thunk": "^2.3.0",
"styled-components": "^3.3.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}

`

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容