Closed saul-hdez closed 3 years ago
Hi @saul-hdez, what are your use cases for this?
For edge cases, it always can be achieved by using a custom script:
https://firebase-wordpress-docs.readthedocs.io/en/latest/developer/add-custom-scripts.html
i need to create a dashboard that feeds form different collections and updates in Realtime without needing to reload the page i know it can be done with custom script + custom shortcode but figured its a simple modification that could be implemented for anybody
The docs say "Dynamically Display Firestore Data on WordPress". Am I to understand then that the above is still the case and that on page load it's doing .get() and not .onSnapshot()? If so, has anyone validated that the real-time updates via a custom script work as expected? I have a similar use case to the above, where I need a dashboard updated without a page reload. @dalenguyen
@skwasha using custom script should works as expected since you have control over the method that using for getting the data.
It would be greate if we could select between just getting the data once or set an active listener for firestore in javascript it would be like the difference between .get() vs .onSnapshot()