DEV Community

Discussion on: Showing "new version available" notification on create-react-app PWAs

Collapse
 
emreerdogan profile image
Emre Erdoğan • Edited

Reloading the page with browser's reload button causes you to lose the snackbar and it doesn't appear again. As a workaround I used localStorage to keep the newVersionAvailable state and populate the local newVersionAvailable state on reload with the value from localStorage.

Collapse
 
khorengrig profile image
khorengrig

The same will happen if you close the tab do not click the refresh button and reopen the tab again.