title: How do I fix null is not an object React Native Splash Screen
body: <p>I have followed the instructions from this exactly: <a href="https://www.npmjs.com/package/react-native-splash-screen" rel="nofollow noreferrer">https://www.npmjs.com/package/react-native-splash-screen</a>
  As well as watching a youtube video that goes over the same steps.</p>
  <p>My code is:</p>
  <pre><code>import * as React from 'react';    
  import SplashScreen from 'react-native-splash-screen';
  import HomePage from './src/Home';
  import {navigationRef} from './RootNavigation';
  import * as RootNavigation from './RootNavigation.js';
  
  const Stack = createStackNavigator();
  
  export default class App extends React.Component {
    componentDidMount() {
      setTimeout(1000);
      SplashScreen.hide();
    }
    render() {
      return (
        &lt;NavigationContainer ref={navigationRef}&gt;
          &lt;Stack.Navigator&gt;
            &lt;Stack.Screen
              name=&quot;Home&quot;
              component={HomePage}
            /&gt;
          &lt;/Stack.Navigator&gt;
        &lt;/NavigationContainer&gt;
      );
    }
  }
  </code></pre>
  <p>The app runs exactly how it should, but only web I remove the componentDidMount method. The line where I set SplashScreen.hide(); is what is causing the error.</p>
  <p>The error I am getting is:</p>
  <pre><code>TypeError: null is not an object (evaluating '_reactNativeSplashScreen.default.hide')
  
  This error is located at:
      in App (at renderApplication.js:45)
      in RCTView (at AppContainer.js:109)
      in RCTView (at AppContainer.js:135)
      in AppContainer (at renderApplication.js:39)
  
  componentDidMount
      App.js:47:4
  </code></pre>
  <p>I have tried doing the manual installation, making sure the react-native-splash-screen is installed and running npm install, but nothing seems to work.</p>