この単純な JSX の例を見ると、次のようになります。
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
Hello, world! I am a CommentBox.
</div>
);
}
});
React.render(
<CommentBox />,
document.getElementById('content')
);
「DOM部分」を変更するにはどうすればよいですか:
<div className="commentBox">
Hello, world! I am a CommentBox.
</div>
...送信する変数に基づいて動的に?