Answers for "order documents in firestore"

0

order documents in firestore

// Create Data
const timestamp = firebase.firestore.FieldValue.serverTimestamp;

db.collection('things').add({ ...myData, createdAt: timestamp() })


// Query
db.collection('things').orderBy('createdAt').startAfter(today)
Posted by: Guest on March-16-2020

Code answers related to "order documents in firestore"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language