由于不清楚location.state的兼容性,IE9中使用this.props.history.push跳转路由,使用state保存参数,使用this.props.location.state取到undefined,打印出来也没有,目前版本antd3.5.4,react-router-dom4.2.2,react16.2.0.
开发环境会报一个没有引入polyfill的警告,发布环境没有警告,我是在src/index.js中第一行引入import ‘babel-polyfill’;不知道这么写对不对
如果IE9无法使用location.state传参,那应该用什么方法?
IE9 react-router-dom路由传参 location.state
Connor
#1
lcoder
#6
1 Like