title: React context only passes down one value
body: <p>I have been working on a React Native project and have come across a strange bug in my code where useContext will only read one of the passed-down values from my provider.</p>
  <p>My provider is here:</p>
  <pre><code>import React, { createContext, useState } from &quot;react&quot;;
  
  export const UserContext = createContext();
  
  export default function UserProvider({ children }) {
    const [user, setUser] = useState({});
  
    return (
      &lt;UserContext.Provider value={{ user, setUser }}&gt;
        {children}
      &lt;/UserContext.Provider&gt;
    );
  }
  </code></pre>
  <p>My entire app project is here</p>
  <pre><code>import React from &quot;react&quot;;
  import &quot;react-native-gesture-handler&quot;;
  import { NavigationContainer } from &quot;@react-navigation/native&quot;;
  import { createStackNavigator } from &quot;@react-navigation/stack&quot;;
  import SettingsProvider from &quot;./src/SettingsProvider&quot;;
  import TheatersProvider from &quot;./src/TheatersProvider&quot;;
  import UserProvider from &quot;./src/UserProvider&quot;;
  import PurchaseProvider from &quot;./src/PurchaseProvider&quot;;
  import LoginDisplay from &quot;./src/Login/LoginDisplay&quot;;
  import Main from &quot;./src/Main/Main&quot;;
  
  const Stack = createStackNavigator();
  
  export default function App() {
    return (
      &lt;NavigationContainer&gt;
        &lt;UserProvider&gt;
          &lt;SettingsProvider&gt;
            &lt;TheatersProvider&gt;
              &lt;PurchaseProvider&gt;
                &lt;Stack.Navigator
                  initialRouteName=&quot;LoginDisplay&quot;
                  screenOptions={{
                    headerShown: false,
                  }}
                &gt;
                  &lt;Stack.Screen name=&quot;LoginDisplay&quot; component={LoginDisplay} /&gt;
                  &lt;Stack.Screen name=&quot;Main&quot; component={Main} /&gt;
                &lt;/Stack.Navigator&gt;
              &lt;/PurchaseProvider&gt;
            &lt;/TheatersProvider&gt;
          &lt;/SettingsProvider&gt;
        &lt;/UserProvider&gt;
      &lt;/NavigationContainer&gt;
    );
  }
  </code></pre>
  <p>And the component which has been dealing with issues is here</p>
  <pre><code>import React, { useContext, useState, useEffect } from &quot;react&quot;;
  import { SettingsContext } from &quot;../../SettingsProvider&quot;;
  import { UserContext } from &quot;../../UserProvider&quot;;
  
  export default function EditProfile({
    visible,
    setVisible,
    update,
    profilePic,
  }) {
    const { settings } = useContext(SettingsContext);
    const { user, setUser } = useContext(UserContext);
  
    return (
      ...
    );
  }
  </code></pre>
  <p>For some reason, the component is able to read the value of the user but returns undefined when trying to access setUser. I don't know why this is happening, especially because I have been able to access setUser in a different part of my application without issues.</p>