loading...

Discussion on: How I built my first Progressive Web App (PWA)

Collapse
rajatkantinandi profile image
Rajat Kanti Nandi

Nice article...
When I tried out PWA for the first time it felt like a lot of configuration to do but workbox makes this task very easy.
I used it with create-react-app which has a default setup for workbox but in order to customize the workbox config I used react-app-rewired which lets you override webpack config with your custom configuration & attach your custom service-worker file.
Here I used StaleWhileRevalidate strategy.
This was a simple weather app where I was caching the bundle files, app background images, favicon icon. And I was storing location data, weather API response data in localStorage for offline access if the network fetch call fails...
Finally, I was able to achieve those scores in my app as well...

Source code: github.com/rajatkantinandi/weather...
Live link: WeatHere.now.sh

Collapse
starbist profile image
Silvestar Bistrović Author

Very nice. Thanks for sharing!