increment firebase database code example
Example 1: Firestore decrement field
const userRef = db.collection('documents').doc('document_id');
const decrement = firebase.firestore.FieldValue.increment(-1);
userRef.update({ fieldToDecrease: decrement });
Example 2: firebase realtime database increment value
Just do that manually
// get val from database
// increment val
// set val in database