照(
更を 知)
const firestore = firebase.firestore()
const collection = firestore.collection('messages')
const unsubscribe = collection
.where('uids', 'array-contains', 'xxxx-xxx-xxx')
.onSnapshot()
.then((snapshot) => {
const data = snapshot.data()
console.log(data)
})
window.addEventListener('unload', unsubscribe)
8 / 16