I am able to successfully get push notification from my server and update react component with this
self.addEventListener('push', event => {
const data = event.data.json();
event.waitUntil(
self.registration.showNotification(data.title, {
body: data.body,
image: './Flowster-icon-32.png'
})
);
const channel = new BroadcastChannel('sw-messages');
channel.postMessage(data);
});
But browser sucs IE, safari, donto support BroadcastChannel, even client.postMessage is not supported in these browser, how can i make it work in those browser. Thanks for the help in advance.