MCPcopy Index your code
hub / github.com/FirebaseExtended/reactfire / StaticValue

Function StaticValue

example/withoutSuspense/Firestore.tsx:94–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92};
93
94const StaticValue = () => {
95 const firestore = useFirestore();
96
97 const ref = doc(firestore, 'count/counter');
98
99 const { status, data } = useFirestoreDocDataOnce(ref);
100
101 if (status === 'loading') {
102 return <LoadingSpinner />;
103 }
104 return <span>{(data as any).value}</span>;
105};
106
107export const Firestore = () => {
108 const {status, data: firestoreInstance} = useInitFirestore(async (firebaseApp) => {

Callers

nothing calls this directly

Calls 2

useFirestoreFunction · 0.85
useFirestoreDocDataOnceFunction · 0.85

Tested by

no test coverage detected