Skip to content

Instantly share code, notes, and snippets.

@Mohammad-Faisal
Last active November 5, 2020 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mohammad-Faisal/4bbb9ea7024295127a8b6670afeafebd to your computer and use it in GitHub Desktop.
Save Mohammad-Faisal/4bbb9ea7024295127a8b6670afeafebd to your computer and use it in GitHub Desktop.
export default function App () {
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.register('firebase-messaging-sw.js')
.then(function(registration) {
console.log('[SW]: SCOPE: ', registration.scope);
return registration.scope;
})
.catch(function(err) {
return err;
});
}
return <div> </div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment