Simple decorator to provide context in the functional style
npm install react-contextifyHigh order component to provide the context in the functional style
``bash`
npm install --save react-contextify
`javascript
import React, {PropTypes} from 'react'
import contextify from 'react-contextify'
const ContextProvider = () => (...)
export default contextify({
foo: PropTypes.string
}, props => ({
foo: props.bar
}))(ContextProvider)
...
const ContextHandler = (_, context) => (...)
ContextHandler.contextTypes = {
foo: PropTypes.string
}
...
...
...
``
MIT