title: Server Side React to HTML
body: <p>How do you configure a node server to host React components/templates and output the HTML as a string after passing in props?</p>
  
  <p>The concept:</p>
  
  <pre><code>const React = require('react');
  const { renderToStaticMarkup } = require('react-dom/server');
  
  const sayHello = props =&gt; (
     return renderToStaticMarkup(&lt;p&gt;Hello, {props.name}!&lt;/p&gt;);
  )
  
  module.exports = sayHello;
  </code></pre>
  
  <p>This seems like the simplest things to do, yet there's very little documentation to make this work in NodeJS. I've tried many different webpack/babel plugins and node errors as soon as you write jsx, ie: <code>&lt;p&gt;Hello...&lt;/p&gt;</code>.</p>