React components and module exports
问题 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. //component.js var SubComponent = React.createClass({ ... }); var Component = React.createClass({ ... render: function () { return( <div><SubComponent /> stuff</div>`) }}); module.exports = Component //main.js var Component = require('./component.js'); var MainContainer = React.createClass({ render: