workbox
ServiceWorkerUpdateListener
Our great sponsors
workbox | ServiceWorkerUpdateListener | |
---|---|---|
31 | 2 | |
12,036 | 4 | |
0.7% | - | |
3.9 | 0.0 | |
13 days ago | over 2 years ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
workbox
-
A deep-dive on a Progressive Web App implementation for a React-based App Platform (DHIS2)
We use the Workbox library and its utilities as a foundation for our service worker.
- New React docs pretend SPAs don't exist anymore
-
[AskJS] technology stack for PWA, ServiceWorker and offline first web app?
Start from the https://github.com/GoogleChrome/workbox
-
Vite in the browser
Here is an example using workbox.
-
Part 2/2 - Game in ReactJS - Cuzzle
Create React App (CRA): This is a library that I have used previously for other games/projects, this is an easy starting point for a react project because we have all our environment configured, for example, we have webpack, hot reloading, service workers (via workbox) and other features ready to be used, for this type of project I think is the best way to learn React.
-
Introduction to workers and why we should use them
Here I would like to recommend using Workbox, which will largely simplify the setups and apply different strategies easily.
-
React PWA with Workbox
There are many approaches to handling requests with a service worker but the easiest way is Google's Workbox and the easiest way to get Workbox into a React app is to just use the PWA template that create-react-app provides. I was able to make an existing React app into a PWA simply by copying /src into a freshly spun CRA PWA-template but you can also get your bundle into Workbox other ways. It's just trickier.
- Are modern front-ends ethical?
-
I created an online multiplayer game and Progressive Web App for ultimate tic-tac-toe using TypeScript, React, and Socket.IO [GitHub and write-up in the comments]
PWAs are simpler to set up than I expected. Workbox does a ton of work for you in providing sane defaults and patterns that work with your build tools (Webpack in this case). I also made use of CRA's service-worker and registerServiceWorker files from their PWA template. Handling app updates was fairly simple to implement using a common pattern (search for updateServiceWorker in the code to see).
-
Introduction to Progressive Web Applications – Part 2
Workbox
ServiceWorkerUpdateListener
-
React PWA with Workbox
To start, it might be worth your while to study this post. You can continue without it but it's probably where I learned the most about this stuff. Buried in the comments someone posted this bit of JavaScript, which does for us everything we need. We're going to use a barely-modified version of Mark's ServiceWorkerUpdateListener.js:
What are some alternatives?
Socket.io - Realtime application framework (Node.JS server)
comlink - Comlink makes WebWorkers enjoyable.
redux - Predictable state container for JavaScript apps
lighthouse - Automated auditing, performance metrics, and best practices for the web.
vite - Next generation frontend tooling. It's fast!
angular-styleguide - Angular Style Guide: A starting point for Angular development teams to provide consistency through good practices.
AngularJS - AngularJS - HTML enhanced for web apps!
self-destroying-sw - Code-snippets and guides on removing ServiceWorker from a websiste.
sqlite-worker - A simple, and persistent, SQLite database for Web and Workers.
Bootstrap - The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
diff-so-fancy - Good-lookin' diffs. Actually… nah… The best-lookin' diffs. :tada:
html5-boilerplate - A professional front-end template for building fast, robust, and adaptable web apps or sites.