MCPcopy Create free account
hub / github.com/FirebaseExtended/reactfire / useSdk

Function useSdk

src/sdk.tsx:42–50  ·  view source on GitHub ↗
(SdkContext: React.Context<Sdk | undefined>)

Source from the content-addressed store, hash-verified

40}
41
42function useSdk<Sdk extends FirebaseSdks>(SdkContext: React.Context<Sdk | undefined>): Sdk {
43 const sdk = React.useContext(SdkContext);
44
45 if (!sdk) {
46 throw new Error('SDK not found. useSdk must be called from within a provider');
47 }
48
49 return sdk;
50}
51
52function useInitSdk<Sdk extends FirebaseSdks>(
53 sdkName: string,

Callers 9

useAppCheckFunction · 0.85
useAuthFunction · 0.85
useAnalyticsFunction · 0.85
useDatabaseFunction · 0.85
useFirestoreFunction · 0.85
useFunctionsFunction · 0.85
usePerformanceFunction · 0.85
useStorageFunction · 0.85
useRemoteConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected