NextJS is my bread and Typescript is my butter, both work together by default, and one without the other give that blank empty feeling.
Pinned Loading
-
-
-
-
A modern-ish SW registration script,...
A modern-ish SW registration script, detecting various state changes. 1if ('serviceWorker' in navigator) {
2window.addEventListener('load', async function() {
3const registration = await navigator.serviceWorker.register('/service-worker.js');
4if (registration.waiting && registration.active) {
5// The page has been loaded when there's already a waiting and active SW.
-
Stuff I wish I'd known sooner about ...
Stuff I wish I'd known sooner about service workers 1# Stuff I wish I'd known sooner about service workers
23I recently had several days of [extremely frustrating experiences](https://twitter.com/Rich_Harris/status/755794434403467265) with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
45I'll add to this list over time – suggested additions welcome in the comments or via [twitter.com/rich_harris](https://twitter.com/rich_harris).
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.