MCPcopy
hub / github.com/triggerdotdev/trigger.dev / useTriggerProvider

Function useTriggerProvider

packages/react/src/TriggerProvider.tsx:18–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16const ProviderContext = createContext<ProviderContextValue>({} as ProviderContextValue);
17
18export function useTriggerProvider() {
19 const value = useContext(ProviderContext);
20 if (!value) {
21 console.error(
22 "You must have a TriggerProvider above where you're using Trigger.dev hooks in your React tree."
23 );
24 }
25 return value;
26}
27
28type TriggerProviderProps = {
29 publicApiKey: string;

Callers 4

useEventDetailsFunction · 0.90
useRunDetailsFunction · 0.90
useRunStatusesFunction · 0.90
ReactHooksFunction · 0.90

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…