title: Seeing "render is not a function" when trying to use Context API
body: <p>I'm trying to learn the Context API, and what I want to achieve, is showing the Logged In user in my header, as well as manipulate my menu options based on the logged in state (Is it safe to store 'isAuthenticated' in state?)</p>
  
  <p>My context class:</p>
  
  <pre><code>import React from 'react';
  
  const Context = React.createContext();
  
  export class Provider extends React.Component {
  
      state = {
          isAuthenticated: true,
          user: {
              name: "Joe Smith",
              email: "joe.smith@here.com"
          }
      }
  
      render() {
          return (
              &lt;Context.Provider value={this.state}&gt;
                  {this.props.children}
              &lt;/Context.Provider&gt;
          )
      }
  }
  
  export const Consumer = Context.Consumer;
  </code></pre>
  
  <p>So, extremely basic. Sets up a state, and in some child components later, I want to display the chaps name.</p>
  
  <p>My App.js is the using 'Provider', so that all my components have access to this data:</p>
  
  <pre><code>import React from 'react';
  import { HashRouter , Route, Switch } from 'react-router-dom';
  import Home from './components/home';
  import Header from './components/header';
  import Accounts from './components/accounts';
  import Reports from './components/reports';
  import Login from './components/login';
  import {Container} from 'reactstrap';
  
  import { Provider } from './context';
  
  function App() {
    return (
      &lt;div className="App"&gt;
        &lt;Provider&gt;
          &lt;HashRouter&gt;
            &lt;Header /&gt;
            &lt;Container&gt;
              &lt;Switch&gt;
                &lt;Route exact path="/" component={Home} /&gt;
                &lt;Route exact path="/accounts" component={Accounts} /&gt;
                &lt;Route exact path="/reports" component={Reports} /&gt;
                &lt;Route exact path="/login" component={Login} /&gt;
              &lt;/Switch&gt;
            &lt;/Container&gt;
          &lt;/HashRouter&gt;
        &lt;/Provider&gt;
      &lt;/div&gt;
    );
  }
  
  export default App;
  </code></pre>
  
  <p>So in this case, 'Header' needs access to my context.
  My Header will show a menu (which, based on some info I'll add to the context, will show or hide options, login buttons etc).</p>
  
  <p>Under the menu, I want to show a small info bar. Logged in user name, for example. So, my header class looks like this:</p>
  
  <pre><code>import React from 'react';
  import Menu from './menu';
  import InfoBar from './infobar';
  import { Consumer } from '../context';
  
  class Header extends React.Component {
  
      render() {
          const menuStyle = {
              paddingBottom: "5px"
          }
  
          return(
              &lt;Consumer&gt;
                  &lt;div style={menuStyle}&gt;
                      {value =&gt; {
                          console.log(value);
                          return (
                              &lt;h1&gt;Test&lt;/h1&gt;
                          )
                      }}
                      &lt;Menu  /&gt;
                      &lt;InfoBar /&gt;
                  &lt;/div&gt;
              &lt;/Consumer&gt;
          )
      }
  }
  
  export default Header;
  </code></pre>
  
  <p>But the problem now happens. When I run my code, it compiles and runs, but right away, I get a runtime error:</p>
  
  <blockquote>
    <p>TypeError: render is not a function updateContextConsumer
    C:/Storage/Scratch/ReactApp/accufinance/node_modules/react-dom/cjs/react-dom.development.js:16082</p>
  </blockquote>
  
  <p>I read something about returns and multiple children, but my code seems to not have that issue. Any assistance with understanding the issue and where the problem is happening would be great. If I comment out the code in 'header', no error... but... no screen either. It seems to be occuring in the  area.</p>