React components and module exports
<p>I don't understand how module.exports can only export one component that has a dependency on a subcomponent but still be rendered in the DOM although that sub component was never exported.</p>

<p>//component.js</p>

<pre><code>var SubComponent = React.createClass({
...
    });

var Component = React.createClass({
    ...
    render: function () { 
    return(
        &lt;div&gt;&lt;SubComponent /&gt; stuff&lt;/div&gt;`)
        }});

module.exports = Component
</code></pre>

<p>//main.js</p>

<pre><code>    var Component = require('./component.js');

    var MainContainer = React.createClass({
    render: function () {return (
    &lt;Component /&gt;)
    }})
</code></pre>