Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wouldn't you have to use `React.createFactory` in this case as well? (when not dealing with React.DOM components)


Yes you do need to use it. I put each component in its own file and use Browserify to require them in like this:

    MyComponent = React.createFactory require './my-component'
then you can do

    render: ->
      (div {},
        (MyComponent {})
      )




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: