title: React 16.13.1 Hooks error `React.useState is not a function`
body: <p>I've got this error</p>
  <pre><code>ERROR    TypeError: React.useState is not a function. (In 'React.useState(false)', 'React.useState' is undefined)
  </code></pre>
  <p>I'm using these dependencies</p>
  <pre><code>&quot;dependencies&quot;: {
      &quot;react&quot;: &quot;16.13.1&quot;,
      &quot;react-dom&quot;: &quot;16.13.1&quot;,
      &quot;react-native&quot;: &quot;~0.63.3&quot;,
      &quot;expo&quot;: &quot;~39.0.2&quot;,
      &quot;expo-splash-screen&quot;: &quot;~0.6.2&quot;,
      ...
    }
  </code></pre>
  <p>I thought <a href="https://reactjs.org/docs/hooks-intro.html" rel="nofollow noreferrer">Hooks are available</a> from 16.8.0 and above. Isn't it? What's the problem?</p>
  <p><strong>EDIT</strong></p>
  <p>Here the snipper of code that causes the crash</p>
  <pre><code>import { Ionicons } from '@expo/vector-icons';
  import * as Font from 'expo-font';
  import * as SplashScreen from 'expo-splash-screen';
  import * as React from 'react';
  
  export default function useCachedResources() {
    const [isLoadingComplete, setLoadingComplete] = React.useState(false);
  
    // Load any resources or data that we need prior to rendering the app
    React.useEffect(() =&gt; {
      async function loadResourcesAndDataAsync() {
        try {
          SplashScreen.preventAutoHideAsync();
  
          // Load fonts
          await Font.loadAsync({
            ...Ionicons.font,
            'space-mono': require('../assets/fonts/SpaceMono-Regular.ttf'),
          });
        } catch (e) {
          // We might want to provide this error information to an error reporting service
          console.warn(e);
        } finally {
          setLoadingComplete(true);
          SplashScreen.hideAsync();
        }
      }
  
      loadResourcesAndDataAsync();
    }, []);
  
    return isLoadingComplete;
  }
  </code></pre>