yash-thakur / pwa-fcm

Use FCM with React-PWA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Firebase Cloud Messaging with ReactPWA

Here is a simple implementation of Firebase Cloud Messaging with React-PWA.

Clone the repo: git@github.com:yash-thakur/pwa-fcm.git && cd pwa-fcm

Make the following necessary changes:

  1. Update GCM-Sender ID in public/manifest.json.
  2. Update the Firebase Config in public/firebase-messaging-sw.js.
  3. Update the Firebase Config in fcm-config.js.

Run using npm i && npm start

Open the browser (http://localhost:3003) with Developer Tools and note the Current Token from the console.

Go to the Firebase Notification Tester and open Notification Composer.

Paste the token and send the Test Notification

About

Use FCM with React-PWA


Languages

Language:JavaScript 77.0%Language:CSS 12.7%Language:TypeScript 10.2%