Replies: 1 comment
-
Hi!
But current version of react-proto (v1.4.1) has a bug and SW dose not start. It is because of my incorrect fixing TS promise error (in EventListener function should return void, not a Promise). This line will not start the registerSW function: window.addEventListener('load', () => registerSW) so, it should be something like this: window.addEventListener('load', () => {
(async () => {
await registerSW()
})().then(
() => {}
).catch(er => console.log(er))
}) I will fix it soon. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
from here
i derive it either is in mode
development
or sends the custom service worked within the response.how does it fit together, given the variable
USE_SERVICE_WORKER
is false by default.ps:
given the service worker is above only invoked if the file is accessed by url
and
USE_SERVICE_WORKER
is false by defaultthen how comes it into play?
pps:
okey i guess the client conditionally registers a service worker by the dynamic url provided within the
getServiceWorker
functionresulting in a request to the aforementioned url and resulting in the serviceWorker getting loaded, installed as outlined by the
ServiceWorkerContainer API.
correct me if im wrong
Beta Was this translation helpful? Give feedback.
All reactions