MCPcopy Create free account
hub / github.com/drcmda/react-contextual / transformContext

Function transformContext

src/transformContext.js:5–20  ·  view source on GitHub ↗
(context, transform)

Source from the content-addressed store, hash-verified

3import { resolveContext } from './context'
4
5export default function transformContext(context, transform) {
6 return Wrapped => {
7 return subscribe(context, transform)(
8 class TransformContext extends React.PureComponent {
9 render() {
10 return (
11 <Wrapped
12 {...this.props}
13 context={resolveContext(context, this.props)}
14 />
15 )
16 }
17 }
18 )
19 }
20}

Callers 3

InvertClass · 0.85
context.jsFile · 0.85

Calls 1

subscribeFunction · 0.90

Tested by

no test coverage detected