I am starting up on ReactJs and I have 2 components snd a render call below:
var Hello = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});
var Hello2 = React.createClass({
render: function() {
return <div>Hello2 {this.props.name}</div>;
}
});
ReactDOM.render(
<Hello name="World" />,
document.getElementById('container')
);
Is it posible to render both components in container?
I've tried:
ReactDOM.render(
<Hello name="World" />,
<Hello2 name="World2" />,
document.getElementById('container')
);
But that didn't work.
How can I do this?