Answers for "firebase servertimestamp"

0

firebase servertimestamp

import { updateDoc, serverTimestamp } from "firebase/firestore";

const docRef = doc(db, 'objects', 'some-id');

// Update the timestamp field with the value from the server
const updateTimestamp = await updateDoc(docRef, {
    timestamp: serverTimestamp()
});
Posted by: Guest on December-23-2021

Browse Popular Code Answers by Language