Ошибка типа: невозможно прочитать свойство 'status' из неопределенного
но на родительском компоненте я передаю статус в качестве реквизита. почему я не могу получить this.props.status здесь?
class App extends Component{
render(){
return (
<div>
<childComponent
status={true}
/>
<div>
)
}
}
ChildComponent.js
class childComponent extends Component{
render(){
console.log("props passed", this.props.status) // getting true
return(
)
}
}
export default reduxForm({
form: 'wizard',
destroyOnUnmount: false,
forceUnregisterOnUnmount: true,
enableReinitialize: this.props.status ? true : false, // error happening
})(
connect(
mapStateToProps,
mapDispatchToProps
)(childComponent)
);
Похожие вопросы Реальный вопрос