when multiple React DOM components are used without outer div then JSX won't compile
问题 Consider this example which won't compile: /** @jsx React.DOM */ var Hello = React.createClass({ render: function() { return <div>Hello</div>; } }); var World = React.createClass({ render: function() { return <div>World</div>; } }); var Main = React.createClass({ render: function() { return ( <Hello /> <World /> ); } }); React.renderComponent(<Main />, document.body); But any of these combinations does work: <div> <Hello /> <World /> </div> <Hello /> //<World /> //<Hello /> <World /> Wanted