title: Best way to build/compile/deploy ReactJS to production
body: <p>I am new to reactJS, and am trying to understand what is the best way to deploy the code to production. As per the link below, I am building using babel as code below, but I was wondering <strong>if this is good, or are there any other best practices</strong> around deploying ReactJS to production:</p>
  
  <pre><code>npm init -y
  npm install --save-dev babel-cli
  npm install --save-dev babel-preset-es2015 babel-preset-react
  
  babel --presets es2015,react --watch src/ --out-dir dist
  </code></pre>
  
  <p><a href="http://www.sitepoint.com/getting-started-react-jsx/" rel="noreferrer">http://www.sitepoint.com/getting-started-react-jsx/</a></p>
  
  <p>Here are my index.html and main.js files:</p>
  
  <h2>index.html</h2>
  
  <pre><code>&lt;!-- index.html --&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;Resources prototype&lt;/title&gt;
      &lt;!-- React / Babel / Jquery Libraries --&gt;
      &lt;script src="react.js"&gt;&lt;/script&gt;
      &lt;script src="react-dom.js"&gt;&lt;/script&gt;
      &lt;script src="browser.min.js"&gt;&lt;/script&gt;
      &lt;script src="jquery.min.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="content"&gt;&lt;/div&gt;
      &lt;script type="text/babel" src="main.js"&gt;&lt;/script&gt;
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h2>main.js</h2>
  
  <pre><code>var First = React.createClass({
    render: function() {
      return (
        &lt;div className="First"&gt;
          Hello, world!
        &lt;/div&gt;
      );
    }
  });
  ReactDOM.render(
    &lt;First /&gt;,
    document.getElementById('content')
  );
  </code></pre>