const lobbyRealTime = (id) => {
return onSnapshot(doc(db, "lobbies", id), (docs) => {
return docs.data();
});
};
I have a code like this in my db.js, and I'm exporting it. I'm importing that in my Game.vue and in my vue file
methods: {
checkLobby() {
this.lobs = lobbyRealTime(`${this.$route.params.id}`)
},
},
mounted() {
this.checkLobby();
},
but my variable becomes a function like
lobs: () => { i.Jc(), t.asyncQueue.enqueueAndForget((async () => Ic(await Cu(t), r))); }
What is the correct way to get this data in real time?