react-service-worker

0.1.1 • Public • Published

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

Package Sidebar

Install

npm i react-service-worker

Weekly Downloads

331

Version

0.1.1

License

MIT

Unpacked Size

9.25 kB

Total Files

5

Last publish

Collaborators

  • maxjf1