1.0.3 • Published 7 months ago

react-use-pwa-install v1.0.3

Weekly downloads
26
License
ISC
Repository
github
Last release
7 months ago

react-use-pwa-install npm npm type definitions

Custom React hook for PWA install button.

Installation

npm install react-use-pwa-install

How to use

import { usePWAInstall } from 'react-use-pwa-install'

export const Header = () => {
	const install = usePWAInstall()

	return (
		<header>
			<h1>My app</h1>
			{install && <button onClick={install}>Install</button>}
		</header>
	)
}

Screencast

UI example

Demo

Check website or code.

Note

Don't forget to fulfill PWA requirements (web.dev, mdn) otherwise the usePWAInstall will return null. Same goes for already installed app.

1.0.3

7 months ago

1.0.2

9 months ago

1.0.1

1 year ago

1.0.0

1 year ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.4

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.3

3 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago