title: Fail Importing expo font
body: <p>I'm getting this error when trying to import a font with expo font.
  <code>null is not an object&quot; (evaluating 'dispatcher.useState')</code>
  But the error is for sure related to my font import.</p>
  <pre><code>import { NavigationContainer, useNavigation } from '@react-navigation/native';
  import { FontAwesome } from '@expo/vector-icons';
  import { MaterialCommunityIcons } from '@expo/vector-icons';
  import {createStackNavigator} from '@react-navigation/stack';
  import { AuthContext } from &quot;./context&quot;;
  import BottomTabNavigator from &quot;./navigation/tabsNav&quot;;
  import * as firebase from &quot;firebase&quot;;
  import Myapp from './instanceFirebase';
  import AuthStackScreen from './navigation/authStack';
  import { ActivityIndicator } from 'react-native'
  import FlashMessage from &quot;react-native-flash-message&quot;;
  
  
  const instanceFirebase = Myapp;
  
  
  import &quot;firebase/functions&quot;;
  import &quot;firebase/firestore&quot;;
  import * as Font from 'expo-font';
  console.log(&quot;font&quot;, Font)
  
  
  const [fontState, setFontState] = React.useState(false);
  
  
  
  const MainStack = createStackNavigator();
  const MainStackScreen = () =&gt; {
    return(
      
      &lt;MainStack.Navigator initialRouteName=&quot;mainPage&quot; &gt;
          &lt;MainStack.Screen 
            name=&quot;mainPage&quot;
            component={BottomTabNavigator} /&gt;
      &lt;/MainStack.Navigator&gt;   
    )
  }
  
  const RootStack = createStackNavigator();
  const RootStackScreen = ({ userToken }) =&gt; (
    &lt;RootStack.Navigator headerMode=&quot;none&quot;&gt;
      {userToken ? (
        &lt;RootStack.Screen
          name=&quot;App&quot;
          component={MainStackScreen}
        /&gt;
      ) : (
        &lt;RootStack.Screen
          headerMode=&quot;none&quot;
          name=&quot;Authstack&quot;
          component={AuthStackScreen}
          options={{
            animationEnabled: false
          }}
        /&gt;
      )}
    &lt;/RootStack.Navigator&gt;
  );
  
  
  
  
  export default function token() {
    const [userToken, setUserToken] = React.useState(null);
    const Context = {
      instanceFirebase: instanceFirebase,
      signOut: () =&gt; {
        setUserToken(null);
      },
      signIn:() =&gt; {
        setUserToken(true);
      }
    }
    
    React.useEffect(() =&gt; {
      const fetchFont = async () =&gt; {
        await Font.loadAsync({
          Jost: require('./assets/fonts/Jost-Regular.ttf'),
          Jost_black: require('./assets/fonts/Jost-Black.ttf')
        })
        setFontState(true)
      }
      fetchFont()
  
  
      firebase.auth().onAuthStateChanged(user =&gt; {
        if(user){
          setUserToken(true)
        } else {
          setUserToken(null)
        }
      })
  
    }, [])
   
    if (!fontState) {
      return &lt;ActivityIndicator /&gt;
    } else {
    return (
      &lt;AuthContext.Provider value={instanceFirebase}&gt;
          &lt;NavigationContainer&gt;
            &lt;RootStackScreen userToken={userToken} /&gt;
              &lt;FlashMessage position=&quot;top&quot; style={{zIndex:99, flex:1, marginTop:30}}/&gt;
          &lt;/NavigationContainer&gt;
          &lt;/AuthContext.Provider&gt;
    )
   }
  }
  
  </code></pre>
  <p>I checked that expo-font is well import, and it is fine.
  I don't understand what is happening, when i comment the code related to the import of the font my app just work. So my error is for sure related to the font import.
  I do things correctly ?
  Thanks per advance for your help</p>