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

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -