title: TypeError: _nextProps.children is not a function
body: <p>I'm trying to use react context with nextJS and i'm getting this error:</p>
  <pre><code>Server Error
  TypeError: _nextProps.children is not a function
  </code></pre>
  <p>My _App.js:</p>
  <pre><code>import Head from &quot;next/head&quot;;
  import Router from &quot;next/router&quot;;
  import { Provider } from &quot;next-auth/client&quot;;
  import DataContextProvider from &quot;../data/data-context&quot;;
  import Layout from &quot;../components/layout/layout&quot;;
  import &quot;../styles/globals.css&quot;;
  
  
  function MyApp({ Component, pageProps }) {
    return (
      &lt;Provider session={pageProps.session}&gt;
        &lt;DataContextProvider&gt;
          &lt;Layout&gt;
            &lt;Head&gt;
              &lt;meta name=&quot;description&quot; content=&quot;Uploader&quot; /&gt;
              &lt;meta
                name=&quot;viewport&quot;
                content=&quot;initial-scale=1.0, width=device-width&quot;
              /&gt;
            &lt;/Head&gt;
            &lt;Component {...pageProps} /&gt;
          &lt;/Layout&gt;
        &lt;/DataContextProvider&gt;
      &lt;/Provider&gt;
    );
  }
  
  export default MyApp;
  </code></pre>
  <p>I searched everywhere but found no solution, thanks for answering</p>