@enten/react-stamp
v0.1.1
Published
Stamp for React
Downloads
1
Maintainers
Readme
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 />)