How to set up Progressive Web App in Reactjs

Step 1.

You have to make a file swDev.js in src directory of Reactjs app
And write a code of registering your serviceWorker file that is in public directory. (you can find the code in swDev.js) and in final import the function from swDev.js in src/index.js and call at the end.