0.1.1 • Published 6 years ago

@enten/react-stamp v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

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