Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

147
Views
Vuejs Firebase - cómo usar onSnapshot
const lobbyRealTime = (id) => { return onSnapshot(doc(db, "lobbies", id), (docs) => { return docs.data(); });

};

Tengo un código como este en mi db.js y lo estoy exportando. Estoy importando eso en mi Game.vue y en mi archivo vue

 methods: { checkLobby() { this.lobs = lobbyRealTime(`${this.$route.params.id}`) }, }, mounted() { this.checkLobby(); },

pero mi variable se convierte en una función como

 lobs: () => { i.Jc(), t.asyncQueue.enqueueAndForget((async () => Ic(await Cu(t), r))); }

¿Cuál es la forma correcta de obtener estos datos en tiempo real?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!