Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

Firestore increment field

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

userRef.update({ FieldToIncrease: increment });
 
PREVIOUS NEXT
Tagged: #Firestore #increment #field
ADD COMMENT
Topic
Name
6+2 =