Jak napisać to bez użycia JSX?jak renderować wiele dzieci bez JSX
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
<h1>Comments</h1>
<CommentList />
<CommentForm />
</div>
);
}
});
ten pochodzi z samouczka react.js: http://facebook.github.io/react/docs/tutorial.html
wiem, że mogę wykonać następujące czynności:
return (
React.createElement('div', { className: "commentBox" },
React.createElement('h1', {}, "Comments")
)
Ale to dodaje tylko jeden element. Jak mogę dodać więcej obok siebie.
JSX Compiler wydaje się przestarzała. Użyj https://babeljs.io/repl/ zamiast –