MCPcopy Create free account
hub / github.com/FormidableLabs/react-live / withLive

Function withLive

packages/react-live/src/hoc/withLive.tsx:12–23  ·  view source on GitHub ↗
(
  WrappedComponent: ComponentType<T & Props>,
)

Source from the content-addressed store, hash-verified

10};
11
12export default function withLive<T>(
13 WrappedComponent: ComponentType<T & Props>,
14) {
15 const WithLive = (props: T) => (
16 <LiveContext.Consumer>
17 {(live) => <WrappedComponent live={live} {...props} />}
18 </LiveContext.Consumer>
19 );
20
21 WithLive.displayName = "WithLive";
22 return WithLive;
23}

Callers 2

live.stories.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected