MCPcopy
hub / github.com/ampproject/amphtml / useLoading

Function useLoading

src/preact/context.tsx:88–91  ·  view source on GitHub ↗
(loadingProp?: Loading_Enum | string)

Source from the content-addressed store, hash-verified

86 * Whether the calling component should currently be in the loaded state.
87 */
88export function useLoading(loadingProp?: Loading_Enum | string): Loading_Enum {
89 const {loading: loadingContext} = useAmpContext();
90 return loadingReducer(loadingProp, loadingContext);
91}

Callers 5

ComponentFunction · 0.90
component.jsFile · 0.90
InfoFunction · 0.90
IframeEmbedWithRefFunction · 0.90

Calls 1

useAmpContextFunction · 0.85

Tested by

no test coverage detected