Skip to content

undefined is not an object (evaluating '_reactNativeSplashScreen2.default.hide') #100

Description

@riryjs

I have already configure my code just like the instruction to use the splash screen but when I compile it using my Redmi Note 3 it returns error like this:

image

in line of code:

class Main extends Component {
  constructor(props) {
    super(props);
    this._onPressLogo = this._onPressLogo.bind(this);
 
  componentDidMount() {      
    SplashScreen.hide();  //ERROR here
  }
  _onPressLogo() {
    //this
    Actions.about();
  }
  render() {
    return (
      <Image style={{ flex: 1, width: null }} source={bg}>
        {/* <AndroidBackButton /> */}
        <StatusBar backgroundColor="#114D44" />
        <View style={{ flex: 1, padding: 15 }}>
          <View style={{ flex: 2, justifyContent: 'center', alignItems: 'center' }}>
            {/* <TouchableHighlight onPress={this._onPressLogo} > */}
              <Image source={logo} />
            {/* //</TouchableHighlight>*/}
          </View>
        </View>
      </Image>
    );
  }
}

react-native: "0.48.4"
react-native-splash-screen: "^3.0.1"
node: v6.11.2
npm: 5.3.0

please tell me how to handle this case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions