I had been trying to make push notifications locally in Reactjs. The Notification API works fine with Desktop browsers. But when it comes to Android, the follow error is thrown.
TypeError: Failed to construct 'Notification': Illegal constructor. Use ServiceWorkerRegistration.showNotification() instead.
I am using creat-react-app's default service worker.
How can I use the above said ServiceWorkerRegistration.showNotification() to make notifications. I checked several sites and I am unable to understand the concept.