Skip to content

fstiehle/react-location-based-progressive-web-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Location based progressive web app

Exemplary implementation of an offline capable, location based React app utilizing service-workers. Shows an app install banner on supported devices.

  • Service workers are generated using Google's sw-precache
  • Dynamic url calls are cached using Google's sw-toolbox

On a successful api call the location is backed up into local storage, if location data is unavailable, the backup from storage is used.

More Importantly: If the dynamic api call fails (Device is offline) the backed up location is used to repeat the call, thus receiving an already cached response. This enables a seamless online to offline experience. Ultimately displaying data from the last available location.

Demo: here

Build the app with gulp build

Run the app for development with gulp (Server is included)

About

Exemplary implementation of an offline capable, location based React app utilizing service workers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published