I am currently utilizing vue.js version 2 in CDN mode. I have designed 2 vue components - one that pushes data to a database and another that displays it. Here is the code snippet:
firebase.database().ref().on('value', function (data) {
console.log("called");
console.log("data received " + JSON.stringify(data));
});
My aim is to continuously read data, however, the above method is not working as expected. It only reads the data once. How can I resolve this issue so that I can consistently read the data?