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

Function incrementCounter

example/withSuspense/Firestore.tsx:23–27  ·  view source on GitHub ↗
(amountToIncrement)

Source from the content-addressed store, hash-verified

21 const ref = doc(firestore, 'count', 'counter');
22
23 const incrementCounter = (amountToIncrement) => {
24 updateDoc(ref, {
25 value: increment(amountToIncrement),
26 });
27 };
28
29 const { data: count } = useFirestoreDocData(ref);
30

Callers 1

CounterFunction · 0.70

Calls 1

incrementFunction · 0.70

Tested by

no test coverage detected