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

211
Views
Cómo leer continuamente el cambio de datos de la base de datos en tiempo real de firebase en vue.js

Estoy usando vue.js versión 2 con modo cdn. He creado 2 componentes vue. Uno de los componentes está enviando los datos a la base de datos y el otro componente los mostrará. A continuación se muestra el código

 firebase.database().ref().on('value', function (data) { console.log("called"); console.log("data received " + JSON.stringify(data)); });

Quiero leer datos continuamente, pero el método anterior no funciona. Lee los datos una sola vez. ¿Cómo resolver este problema para poder leer los datos continuamente?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

He hecho esto en vue como este

 import { onValue, ref as Ref} from "firebase/database"; onValue(Ref(db, path), (snapshot) => { // you get value here //snapshot.val()); }); // where db is the main Database reference // and path is the path inside db
about 4 years ago · Juan Pablo Isaza Report
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!