2.0.0 • Published 4 years ago
use-next-with-workbox v2.0.0
use-next-with-workbox
Utilities for using Workbox with Next.js + React.
Install
yarn add use-next-with-workbox
Usage
import React from "react";
import { useWorkbox } from "use-next-with-workbox";
export default function Component() {
useWorkbox({
offlinePath: "/offline",
registerOptions: {},
scriptURL: "sw.js",
showSkipWaitingPrompt: false,
});
return <p>Hello World!</p>;
}
License
MIT © cansin