You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.
useEffect(()=>{// TODO: notify user that the app is available for offline use// ...// https://developer.chrome.com/docs/workbox/modules/workbox-window/#register-a-service-worker-and-notify-the-user-the-very-first-time-that-service-worker-is-active// @ts-ignoreconstwb=window.workbox// @ts-ignorewb.addEventListener('activated',(event)=>{if(!event.isUpdate){console.info('WB | activated | event: ',event)// READY FOR OFFLINE USE !!!!!!// do something with it ....}})},[])
Offline detection can be implemented using:
Workbox docs reference: https://developer.chrome.com/docs/workbox/modules/workbox-window/#register-a-service-worker-and-notify-the-user-the-very-first-time-that-service-worker-is-active
To turn off page reload after getting back online,
reloadOnOnline: false
can be set innext-pwa
config: https://github.com/shadowwalker/next-pwa#available-optionsThe text was updated successfully, but these errors were encountered: