0.2.4 • Published 1 year ago

react-use-pwa-install v0.2.4

Weekly downloads
26
License
ISC
Repository
github
Last release
1 year 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 React from 'react'
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.

0.2.3

1 year ago

0.2.2

1 year ago

0.2.4

1 year ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.3

2 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago