MCPcopy Index your code
hub / github.com/ampproject/amphtml / Component

Function Component

test/unit/preact/test-context.js:7–11  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

5
6describes.sandboxed('preact/context', {}, () => {
7 function Component(props) {
8 const context = useAmpContext();
9 const loading = useLoading(props.loading);
10 return <ContextReader {...context} computedLoading={loading} />;
11 }
12
13 function ContextReader() {
14 return <div />;

Callers

nothing calls this directly

Calls 2

useAmpContextFunction · 0.90
useLoadingFunction · 0.90

Tested by

no test coverage detected