title: 'Functions are not valid as a React child' when trying to dynamically include Components for SSR bundle
body: <p>From my express route I'm trying to pass a component to use in a render function, that handles SSR.</p>
  
  <p><strong>Express Route:</strong></p>
  
  <pre><code>import SettingsConnected from '../../../client/components/settings/settings-connected';
  
  function accountTab(req, res, next) {
    sendToRenderApp(req, res, { profileInfo }, url, SettingsConnected);
  }
  </code></pre>
  
  <p><strong>Render helper:</strong></p>
  
  <pre><code>export const sendToRenderApp = (req, res, storeObj = {}, urlPath, componentFunc) =&gt; {
    const store = configureStore(storeObj);
    const dynamicComponent = componentFunc;
  
    const component = (
      &lt;Provider store={store}&gt;
        &lt;React.Fragment&gt;
          &lt;dynamicComponent /&gt;
        &lt;/React.Fragment&gt;
      &lt;/Provider&gt;
    );
  
    const sheet = new ServerStyleSheet();
    const app = renderToString(sheet.collectStyles(component));
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <p>"<em>Warning: Functions are not valid as a React child. This may happen if you return a Component instead of  from render. Or maybe you meant to call this function rather than return it.</em>"</p>
  
  <p>Things I've already had a look at include this answer below, but I'm not sure how to wrap such a function inside (what I presume) the Provider component?</p>
  
  <p><a href="https://stackoverflow.com/questions/48458334/functions-are-not-valid-as-a-react-child-this-may-happen-if-you-return-a-compon?rq=1">Functions are not valid as a React child. This may happen if you return a Component instead of from render</a></p>