I am developing a React JS application in which I would like the user to receive real-time updates which would trigger a re-render of the page. As I am using Firebase for my backend, I am currently trying to achieve this using Cloud Messaging by sending data messages (not notifications) to a topic the user is subscribed to.
As I am only sending data messages that would update the content of the page, I would like to avoid to have to ask the user to allow notifications through this popup:
Is there a way that this could be done, or another service one could suggest? I have also looked into Google PubSub as I am already on GCP, but it appears that is less for sending data to user devices and more for between services.
Edit: It also appears that in iOS and Android, data messages are still received even when notifications are disabled by the user. However, based on my testing this does not seem to be the case on web. When the user blocks notifications, it seems to automatically unregister the registration token. Is there any way around this? It would be also suitable for my purposes if the user was shown the popup but could still receive data messages regardless of their decision.