Hi,
I'm trying to use fcm to implement push notifications in a react.js web app.
when i followed the fcm docs and declared firebase.messaging.onMessage handler in the web app code, and setBackgroundMessageHandler in the service worker
push notifications did get to the right handler in different states of the app (is tab focused or not) but then service worker postMessage api doesn't work for me.
so i defined my own service worker and registered it with firebase.messaging.useServiceWorker and now postMessage works fine, but now all the push notifications gets
intercepted by the service worker and messaging.onMessage isn't called even when the app is in focus.
did anyone encounter that, or have any suggestion?
thanks!
Idan