create-factory-loader
v2.2.0
Published
Webpack loader to wrap exported react components in `react.createFactory`.
Downloads
3
Readme
create-factory-loader
Webpack loader to wrap exported react components in react.createFactory
.
Installing
npm install --save create-factory-loader
Example Usage
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