Skip to content Skip to sidebar Skip to footer

Realtime Update Between Firebase And Html Table

Below code displays data from firebase into table However it doesnt change automatically when i change data in my firebase. How can i achieve realtime update? Thats the only thin

Solution 1:

you used the "once" method that listens for changes once and then stops. you want to use the "on" method that keeps listening for changes. for example, instead of:

database.ref().once('value', function(snapshot){

use:

database.ref().on('value', function(snapshot){

relevant documentation: https://firebase.google.com/docs/database/web/read-and-write#listen_for_value_events

Post a Comment for "Realtime Update Between Firebase And Html Table"