React with PWA

Making a Progressive Web App with react

The production build has all the tools necessary to generate a first-class Progressive Web App, but the offline/cache-first behavior is opt-in only.

Create new react app pwa

npx create-react-app my-app --template cra-template-pwa

Adding service worker file on src/index.js change unregister to register

serviceWorkerRegistration.register();

Create an build file run the following comment

npm run build

Need to host the build file with https to host free by using netlify

Note : if Manifest doesn’t have a maskable icon Error follow the steps


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s