Want to render multiple children without JSX? You can use the online Babel REPL (https://babeljs.io/repl/) as a quick way to convert little chunks of JSX to the equivalent JavaScript.
1 2 3 4 5 6 7 8 9 10 11 | var CommentBox = React.createClass({displayName: 'CommentBox', render: function() { return ( React.createElement("div", {className: "commentBox"}, React.createElement("h1", null, "Comments"), React.createElement(CommentList, null), React.createElement(CommentForm, null) ) ); } }); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.