JSX를 사용하지 않고 이것을 작성하는 방법은 무엇입니까? 이것은 react.js 튜토리얼에서 오는JSX없이 여러 자식을 렌더링하는 방법
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
<h1>Comments</h1>
<CommentList />
<CommentForm />
</div>
);
}
});
:
return (
React.createElement('div', { className: "commentBox" },
React.createElement('h1', {}, "Comments")
)
을하지만 이것은 단지 하나 개의 요소를 추가 : http://facebook.github.io/react/docs/tutorial.html
은 내가 다음을 수행 할 수 있습니다 알고 있습니다. 서로 어떻게 더 많이 추가 할 수 있습니까?
JSX 컴파일러는 사용되지 않는 것 같다. 대신 https://babeljs.io/repl/을 사용하십시오 –