react-native-progress-hud icon indicating copy to clipboard operation
react-native-progress-hud copied to clipboard

Required context was not specified

Open blaesus opened this issue 9 years ago • 0 comments

I keep getting this annoying error in title when I user ProgressHUD, detail as follows:

image

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?

blaesus avatar Jun 14 '16 08:06 blaesus