DEV Community

loading...

Discussion on: Making React App a Progressive Web App (PWA)

Collapse
morganjay profile image
James Morgan

Don't React apps already come with PWA features?

Collapse
ankitkamboj18 profile image
Ankit Kamboj Author

yes, it used to but now with the latest release, they made it optional.
Now you have to use this additional template if you want yo use service workers and PWA i.e npx create-react-app my-app --template cra-template-pwa

Collapse
morganjay profile image
James Morgan

Thanks!

Collapse
mustafaanaskh99 profile image
Mustafa Anas

Any idea why they made it optional?
Does it make the app any "heavier"?

Great tip by the way <3

Thread Thread
ankitkamboj18 profile image
Ankit Kamboj Author

They made it optional because every organization/individual has their own way of implementing service workers and PWA. And they don't want to force something which in the end is not required and replaced by some custom code.
Making the app heavier is not right to say as to when we add our own custom code for service workers and PWA implementation that also takes some memory, so it's not because of making the app heavier. Just they provided choice if we want we can use else skip.