我可能错过了一些东西,但这里是。如果我有:
var Swoosh = React.createClass({
render: function() {
return (
<div className="swoosh">
Boom.
</div>
);
}
});
React.renderComponent(
<Swoosh />,
document.getElementById('content')
);
我可以props
在挂载点( where id='content'
)上设置为属性吗?
<div id='content' foo='alice' bar='has' bav='a cat' />
<!-- have foo, bar & bav available as props in <Swoosh />? -->