DEV Community

Discussion on: Flawless and Silent Upgrade of the Service Worker 🔌

Collapse
 
asdev808 profile image
asdev808

I have just upgraded from react 16 to 17 and then followed this tutorial, but I still need to close the tab and open again to see the updates, I really hate PWA's.

Collapse
 
atonchev profile image
a-tonchev

Hi @myfairshare the update does not happen immediately. First you need to load the page, so that it detects the new service worker, to prepare caches and to replace the index.html

After the next reload your website will be updated with the new service worker

Collapse
 
asdev808 profile image
asdev808

Ok thanks for the reply mate. I think next time I build a mobile app I will try flutter instead!!

Thread Thread
 
atonchev profile image
a-tonchev

Unfortunately there is a big difference and use cases between PWA and Mobile App. And PWA gain much on popularity. I also hate the way the PWA handles the updates, but they will surely change it in future.

Thread Thread
 
asdev808 profile image
asdev808

I hope your right, thanks!!