create-factory-loader

2.2.0 • Public • Published

create-factory-loader CircleCI

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

Readme

Keywords

none

Package Sidebar

Install

npm i create-factory-loader

Weekly Downloads

1

Version

2.2.0

License

MIT

Last publish

Collaborators

  • hallettj
  • originate-owner