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

Function StaticValue

example/withSuspense/Firestore.tsx:40–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38};
39
40const StaticValue = () => {
41 const firestore = useFirestore();
42
43 const ref = doc(firestore, 'count/counter');
44
45 const { data } = useFirestoreDocDataOnce(ref);
46
47 return <span>{(data as any).value}</span>;
48};
49
50const List = ({ query, removeAnimal }) => {
51 const { data: animals } = useFirestoreCollectionData(query, { idField: 'id' });

Callers

nothing calls this directly

Calls 2

useFirestoreFunction · 0.85
useFirestoreDocDataOnceFunction · 0.85

Tested by

no test coverage detected