@upr/hooks
v0.1.0
Published
A collection of useful react hooks
Downloads
4
Readme
hooks for react
installation
npm
npm i -S @upr/hooks
browser
<script src="https://unpkg.com/@upr/hooks"></script>
usage
import React from 'react'
import { useOffline } from '@upr/hooks'
export default () => {
const fallbackValue = false
const offline = useOffline(fallbackValue)
return <>{offline && 'Offline'}</>
}