(initialState)
| 2 | import { createNamedContext } from './context' |
| 3 | |
| 4 | export default function moduleContext(initialState) { |
| 5 | return Wrapped => { |
| 6 | let context = undefined |
| 7 | const ModuleContext = class extends React.PureComponent { |
| 8 | render() { |
| 9 | return <Wrapped {...this.props} context={context} /> |
| 10 | } |
| 11 | } |
| 12 | context = createNamedContext(ModuleContext, initialState) |
| 13 | return ModuleContext |
| 14 | } |
| 15 | } |
no test coverage detected