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

Function incrementCounter

example/withoutSuspense/Firestore.tsx:16–20  ·  view source on GitHub ↗
(amountToIncrement)

Source from the content-addressed store, hash-verified

14 const { status, data: count } = useFirestoreDocData(ref);
15
16 const incrementCounter = (amountToIncrement) => {
17 updateDoc(ref, {
18 value: increment(amountToIncrement),
19 });
20 };
21
22 if (status === 'loading') {
23 return <LoadingSpinner />;

Callers 1

CounterFunction · 0.70

Calls 1

incrementFunction · 0.70

Tested by

no test coverage detected