MCPcopy Create free account
hub / github.com/ampproject/amphtml / useResourcesNotify

Function useResourcesNotify

src/preact/utils.js:9–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7 * Every functional component **must** use this helper.
8 */
9export function useResourcesNotify() {
10 const {notify} = useAmpContext();
11 useLayoutEffect(() => {
12 if (notify) {
13 notify();
14 }
15 });
16}
17
18/**
19 * @param {import('preact').Ref<T>} ref

Callers 6

component.jsFile · 0.90
component.jsFile · 0.90
BentoDateCountdownFunction · 0.90
BentoDateDisplayFunction · 0.90
RenderWithRefFunction · 0.90
BentoTimeagoFunction · 0.90

Calls 1

useAmpContextFunction · 0.90

Tested by

no test coverage detected