Implementing Progressive Web Apps with React A Practical Guide to create Web Apps that provides a native experience to the… (Enrique Pablo Molinari)(Z-Library)
In this book we are going to implement a Progressive Web App (PWA) using a step-by-step approach. This learning experience starts with an already crafted React application called Task List, created using the create-react-app tool with the cra-template-pwa template, which gives us a good starting point for building a progressive web app.
We will go into the details about how to make the web app installable and after that how to improve the user experience by adding offline support to the web app. To make the learning process smooth I will first add offline support for the read-only use cases of the application. After that, I will show how to provide full offline support by using the IndexedDB database and the Background Sync service. I will also explain how to update progressive web apps. How users get notified that there is a new release of the application waiting to be installed and how that actually happens.
About the Author
Enrique Molinari holds a Master in Software Engineering at Universidad Nacional de La Plata (Argentina). With 20 years of experience in the software industry he has worked in many software projects as developer, technical lead and architect. He is also professor at Universidad Nacional de Río Negro, in charge of the Object Oriented Design and Advanced Database Systems undergraduate courses.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A hands-on guide that takes a working React app and turns it into a fully installable, offline-capable Progressive Web App, one feature at a time. Best for React developers who want a practical, code-along path to native-like web experiences rather than a theory-heavy PWA overview.
【Book Arc】
- **Opening (~0%–10%)**: Frames what "progressive" means and why PWAs sit between plain websites and native apps, then sets up the development environment (VS Code, snippets, Prettier) and the sample Task List app.
- **Early (~10%–30%)**: Gets the starter project running behind a reverse proxy (Kong/Nginx) or LocalTunnel, then introduces the Service Worker as the engine behind PWA capabilities and walks through registration and the install/activate lifecycle.
- **Middle (~30%–50%)**: Explains caching with Workbox — precaching, runtime routes, cache storage — and shows how to inspect the service worker and caches in Chrome DevTools.
- **Late (~50%–75%)**: Makes the app installable via the web app manifest (name, icons, start_url, display, theme/background colors) and begins adding offline support, starting with read-only use cases.
- **Ending (~75%–100%)**: Extends to full offline support using IndexedDB and Background Sync, then covers app updates — how users are notified of a new release and how the new service worker takes over. (Excerpts do not cover the final update mechanics in detail.)
【Key Takeaways】
- **A PWA is a web app that borrows native-app capabilities** (Opening): installability, splash screens, offline support, background sync, and push notifications — all enabled by modern browser features rather than a separate codebase.
- **The Service Worker is the foundation of everything PWA** (Early): it's a background-thread JavaScript program that intercepts network requests, and it's what makes offline behavior possible at all.
- **Registration is a required, explicit step** (Early): the `cra-template-pwa` template ships with `service-worker.js` and `serviceWorkerRegistration.js`, but registration is disabled by default — you must switch `unregister()` to `register()`.
- **The service worker lifecycle governs behavior** (Early–Middle): install, activate, and message events drive caching and updates; understanding this cycle is essential before debugging offline issues.
- **Workbox handles the caching heavy lifting** (Middle): Google's module set provides precaching, routing, and strategies like StaleWhileRevalidate, plus expiration plugins to cap cache size.
- **Installability depends on a well-formed manifest** (Late): name/short_name, 192×192 and 512×512 icons, start_url, display mode, and theme/background colors determine how the app appears once installed.
- **Offline support can be layered incrementally** (Late): the book deliberately starts with read-only offline cases before tackling full offline, making the learning curve manageable.
- **Full offline needs IndexedDB plus Background Sync** (Ending): writes are stored locally and synced to the server once connectivity returns, closing the gap between read-only and true offline use.
【Reading Tips】
- Deep-read the Service Worker lifecycle and Workbox chapters — they're the conceptual core; skim the environment setup and proxy/LocalTunnel configuration if you already have a working dev stack.
- Keep Chrome DevTools open on the Application tab throughout; the book relies on inspecting Service Workers and Cache Storage to verify each step.
- Treat the Task List app as a lab: after each feature (installable, read-only offline, full offline), break it deliberately (go offline, clear caches) to see how it behaves.
- Don't skip the manifest details — small mistakes in icons or display mode are the most common reason an app won't install.
- If you're new to IndexedDB, budget extra time for the full-offline section; it's the steepest part of the book.
【Coverage Limits】
This guide is based on stratified excerpts covering roughly the first half of the book in detail; the IndexedDB, Background Sync, and app-update chapters are summarized from the introduction and are not deeply represented in the source material.
Page 3
ogressive Web Apps? . . . . . . . . . . . . . . . . . . 8 1.3 Capabilities of Progressive Web Apps . . . . . . . . . . . . . . 8 2 Crafting your First PWA 10...
u will see the Task List front-end. 2.1.2 Using LocalTunnel If you don’t want to go with a reverse proxy, the alternative I will propose is to use localtunne...
ation.js source code. CHAPTER 2. CRAFTING YOUR FIRST PWA 24 might trigger in a different thread the download of your static files in order to cache them. Thi...
Figure 2.16: Chrome DevTools - latest-tasks cache populated We have improved how the application manages the retrieval of the task list under connectivity is...
tarter project, since we use it to inform the user when the internet connection has gone. The first change we will do is to move the render of the OfflineAle...
e worker listening to and processing sync events, obtaining the data from IndexedDB and sending it to the remote service. Figure 4.1: Using Background Sync a...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Implementing Progressive Web Apps with React A Practical Guide to create Web Apps that provides a native experience to the… (Enrique Pablo Molinari)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Implementing Progressive Web Apps with React A Practical Guide to create Web Apps that provides a native experience to the… (Enrique Pablo Molinari)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment