0.1.1 • Published 6 years ago

react-service-worker v0.1.1

Weekly downloads
243
License
MIT
Repository
github
Last release
6 years ago

React Service Worker

Simple and powerful alternative for the default create-react-app registerServiceWorker

Installation

npm install react-service-worker -S

Usage

the default registerServiceWorker generated by create-react-app is very simple and only gives you ways to register and unregister your service worker. Any other action should be implemented manually.

The react-service-worker module provides better organization and more features like listen for updates on your APP easily.

The integration is very simple, just open the src/index file in your project and replace

import registerServiceWorker from './registerServiceWorker';

for:

import registerServiceWorker from 'react-service-worker';

and done! This way, the react service worker will act just like the default registerServiceWorker.

Tests

npm test