I'm trying to use react nested elements here, but am I unable to render the third element. The first two react sub-elements work perfectly but the second nested element doesn't render? Why is that so? How should I fix this?
var Nested=React.createClass({
render: function(){
return(
<div className="second">nested div</div>
)
}
});
var Component=React.createClass({
render: function(){
return(
<div className={this.props.className}>
<Nested>
<Nested/> //this doesn't want to render
</Nested>
<Nested/>
</div>
);
}
});
ReactDOM.render(
<div>
<Component/>
</div>,
document.getElementById("app"));