DEV Community

Discussion on: The easiest way to extend or customize Create React App service worker without ejecting

Collapse
 
ericyoung profile image
Eric Young • Edited

for those of us newer to service workers, it would be cool to show an example of your "firebase-messaging-sw.js" file.
Also, how you're handling requesting the user permissions would be nice to see.

Collapse
 
m3h0w profile image
Michał Gacka

Sure. I don't remember where I got the code from to glue it together unfortunately but I appended it to the post so you can take a look if you'd like.

The gist.