How To Update Viewpage With New Data Automatically From Firebase?
I know Firebase provides data in realtime but I am not being able to update my view with new data without refreshing the full page. How do I update my html page with new data witho
Solution 1:
In your .then after setting to your database you could location.reload(),
This is hacky though.
Modern frameworks are great with firebase because they re render on state changes. I love react and firebase.
Alternatively you can use firebase event listeners, although, I’m unsure how to implement with vanilla javascript. https://firebase.google.com/docs/database/web/read-and-write#listen_for_value_events
Post a Comment for "How To Update Viewpage With New Data Automatically From Firebase?"