Required context was not specified
blaesus opened this issue · comments
Andy commented
I keep getting this annoying error in title when I user ProgressHUD, detail as follows:
If I remove the isRequired
in ProgressHUD source code (line 25), I will no longer get it.
contextTypes: {
showProgressHUD: React.PropTypes.func.isRequired, // Remove isRequired here will solve it
dismissProgressHUD: React.PropTypes.func
},
The render function looks like this
render() {
// Something else
<ProgressHUD
isVisible={this.props.hudVisible}
isDismissible={false}
overlayColor="rgba(0, 0, 0, 0.11)"
/>
}
What can I do here?