title: React.useContext not updating
body: <p>This is my first time using the React context hooks in an app and I am trying to set the <code>SelectedBackgroundContext</code> and it will not update. <code>console.log(typeof selectBackground)</code> does appear as a function so I believe it is importing correctly and am not sure why it's not updating.</p>
  <p>All of my code can be found in this CodeSandbox link below. The line I am running into <strong>issues with is child.js:8</strong>.</p>
  <p><strong>child</strong></p>
  <pre><code>export default function Child() {
    const { selectedBackground } = useContext(SelectedBackgroundContext);
    const { selectBackground } = useContext(SelectedBackgroundContext);
  
    selectBackground(null); //Should render text saying &quot;None&quot; instead of image
    console.log(selectedBackground);
  
    const renderSelected = (context) =&gt; {
      if (context) {
        return (
          &lt;img
            style={{ height: &quot;200px&quot; }}
            src={context}
            key={context + &quot;Thumbnail&quot;}
            alt={&quot;thumbnail of &quot; + context}
          /&gt;
        );
      } else {
        return &lt;p&gt;None&lt;/p&gt;;
      }
    };
  
    return (
      &lt;div&gt;
        &lt;p&gt;Background:&lt;/p&gt; {renderSelected(selectedBackground)}
      &lt;/div&gt;
    );
  }
  </code></pre>
  <p><strong>context</strong></p>
  <pre><code>export const SelectedBackgroundContext = React.createContext({
    selectedBackground:
      &quot;https://lp-cms-production.imgix.net/2019-06/81377873%20.jpg?fit=crop&amp;q=40&amp;sharp=10&amp;vib=20&amp;auto=format&amp;ixlib=react-8.6.4&quot;,
    selectBackground: () =&gt; {}
  });
  </code></pre>
  <p><a href="https://codesandbox.io/s/react-context-troubleshooting-ojnb2?fontsize=14&amp;hidenavigation=1&amp;theme=dark" rel="nofollow noreferrer"><img src="https://codesandbox.io/static/img/play-codesandbox.svg" alt="Edit React Context Troubleshooting" /></a></p>
  <p>I would be grateful for any advice!</p>