reactjs - creating separate modules
<p>Here is my simple reactjs application. It all works fine but I would like to know how to create separate modules ie;I want to separate the components in script.js and add it another file and include it.</p>

<p>How can I do it in reactjs?</p>

<p>Currently, the application is not deployed on any server.</p>

<p>script.js:</p>

<pre><code>var CreatePanel = React.createClass({ 
    render: function(){ 
        return &lt;div className="row"&gt;
            &lt;div className = "col-xs-6 col-sm-3"&gt;
                &lt;input type="text"&gt;&lt;/input&gt;
                &lt;select&gt;&lt;/select&gt;
            &lt;/div&gt;
        &lt;/div&gt;; 
    } 
}); 

var FilterPanel = React.createClass({ 
    render: function(){ 
        return &lt;div className="row"&gt;Filter Panel&lt;/div&gt;; 
    } 
}); 

React.render(&lt;div class="container"&gt;
    &lt;CreatePanel/&gt;   
    &lt;FilterPanel/&gt; 
&lt;/div&gt;
    , document.getElementById('react-container'));
</code></pre>

<p>html</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;script src="fb.me/react-0.13.3.min.js"&gt;&lt;/script&gt;
    &lt;script src="cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.29/browser.js"&gt;&lt;/script&gt;

    &lt;!-- Latest compiled and minified CSS --&gt;
    &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"&gt;

    &lt;!-- Optional theme --&gt;
    &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"&gt;

    &lt;!-- Latest compiled and minified JavaScript --&gt;
    &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"&gt;&lt;/script&gt;
    &lt;title&gt;React Components&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
    &lt;div id="react-container"&gt;&lt;/div&gt;
    &lt;script type="text/babel" src="./myscript.js"&gt;
    &lt;/script&gt;
&lt;/body&gt;

&lt;/html&gt;
</code></pre>