title: State from Context returning in Screen Component but not App.js
body: <p>I'm attempting to pass two forms of state (user + signedIn) to my app.js for my React Native app, so I can access those values and determine if a user is signed in.</p>
  <p>If I try to import my context into a given component screen (in this case, using SignInScreen) then the context returns perfectly and I can console log my state. See example below.</p>
  <pre><code>const SignInScreen = () =&gt; {
    const {signIn, user, signedIn} = useContext(AuthContext);
  
    const signInFunction = async () =&gt; {
      await signIn(email, password, navigation);
      console.log(user); // Returns []
      console.log(signedIn) // Returns true
    };
  
    return (
      // Component code
    );
  };
  </code></pre>
  <p>However, in my app.js, when I try to access my context, it returns undefined - indicating it hasn't got access to it.</p>
  <pre><code>import {AuthContext, AuthProvider} from './src/context/AuthContext';
  
  function App({navigation}) {
  
    const {user, signedIn} = useContext(AuthContext);
  
    useEffect(() =&gt; {
      console.log(user); // errors out, stating 'undefined is not an object'
      console.log(signedIn); // same as user
    }, [])
    return (
      &lt;&gt;
        &lt;AuthProvider&gt;
          &lt;NavigationContainer ref={navigationRef}&gt;
            &lt;AuthStackScreen /&gt;
          &lt;/NavigationContainer&gt;
        &lt;/AuthProvider&gt;
      &lt;/&gt;
    );
  }
  </code></pre>
  <p>For reference, here's part of my Context code:</p>
  <pre><code>export const AuthContext = React.createContext();
  
  export const AuthProvider = ({children}) =&gt; {
    const [user, setUser] = useState([]);
    const [signedIn, setSignedIn] = useState(true);
  
    return (
      &lt;AuthContext.Provider
        value={{ user, signedIn }}&gt;
        {children}
      &lt;/AuthContext.Provider&gt;
    );
  };
  </code></pre>
  <p>Does anyone know what I'm doing wrong here? How can I access my two forms of state from my context?</p>