@enten/react-stamp

0.1.1 • Public • Published

react-stamp

Stamp for React

Install

npm install @enten/react-stamp --save

Usage

import React from 'react'
import {compose} from '@enten/react-stamp'

const Component = compose(React.Component)

Example

import React from 'react'
import {compose} from '@enten/react-stamp'

const Component = compose(React.Component)

const HelloWho = Component.compose({
  render () {
    return `Hello ${this.props.who}`
  }
})

const HelloWorld = HelloWho.compose({
  defaultProps: {
    who: 'world'
  }
})

React.render(<HelloWorld />)

License

MIT

Package Sidebar

Install

npm i @enten/react-stamp

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • enten