Webpack loader to wrap exported react components in react.createFactory
.
npm install --save create-factory-loader
components/tab.coffee
:
class Tab extends react.Component
render: ->
div null, @props.text
components/tab_view.coffee
:
Tab = require 'create-factory!./tab'
class TabView extends react.Component
render: ->
for tab in @props.tabs
Tab text: tab.name