title: React server not starting - something with renderProps
body: <p>I have a React app and here is my server code:</p>
  
  <pre><code>app.get('*', (req, res) =&gt; {
    let history = createMemoryHistory();
    let store = configureStore();
    let routes = createRoutes(history);
    match({ routes, location: req.url }, (error, redirectLocation, renderProps) =&gt; {
      if (redirectLocation) {
        res.redirect(301, redirectLocation.pathname + redirectLocation.search);
      } else if (error) {
        res.status(500).send(error.message);
      } else if (renderProps == null) {
        res.status(404).send('Not found');
      } else {
        let { query, params } = renderProps;
        let comp = renderProps.components[renderProps.components.length - 1];
        console.log('fetching');
        comp.fetchData({ store, params })
          .then(() =&gt; {
            console.log('done fetching');
            let html = ReactDOMServer.renderToString(
                &lt;Provider store={store}&gt;
                { &lt;RouterContext {...renderProps}/&gt; }
              &lt;/Provider&gt;
            );
            const template = store.getState().template;
            const og = templateToOpenGraph(template);
            const full = wrap(html, store.getState(), og);
            res.set({ 'Cache-Control': 'public, max-age=300' })
            res.send(full);
          })
      }
    });
  })
  </code></pre>
  
  <p>When I start the server, it starts up just fine. But when I hit a route (any route), I get an error:
  <code>
  TypeError: comp.fetchData is not a function
  </code></p>
  
  <p>What do I need to do? I'm not the greatest with react, so if I'm missing something obvious, please do let me know.</p>
  
  <p>Thanks!</p>