Answers for "Firestore decrement field"

2

Firestore decrement field

const userRef = db.collection('documents').doc('document_id');
const decrement = firebase.firestore.FieldValue.increment(-1);

userRef.update({ fieldToDecrease: decrement });
Posted by: Guest on July-03-2020

Code answers related to "Firestore decrement field"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language