reactjs - Nested React Components with CoffeeScript -
to nest components in react using regular jsx i've seen following snippet:
render: function() { return ( <div> <span>options:</span> <copmonent.comment.list /> <copmonent.comment.form /> </div> ); what's equivalent using react.dom (and coffeescript)?
render: -> react.dom.div {}, react.dom.span {}, "options:" ??? ???
i create factories components:
list = react.createfactory(listclass) form = react.createfactory(formclass) then, can call them directly wherever want:
render: -> react.dom.div {}, react.dom.span {}, "options:" component.comment.list {} component.comment.form {}
Comments
Post a Comment