草庐IT

StepButton

全部标签

javascript - 当包装在 <Grid> 中时,组件将失去对存储的访问权限(react-inline-grid)

我正在使用react-inline-grid,一旦我用包装我的组件,包装的组件似乎失去了对商店的访问权限:UncaughtTypeError:Cannotreadproperty'currentStep'ofundefined代码:classAppextendsComponent{componentDidMount(){const{dispatch}=this.props;dispatch(loadData());}render(){return();}}constmapStateToProps=state=>({app:state.app});exportdefaultconnect