@bscop/use-toggle
v1.0.1
Published
A React hook that offers a shortcut to toggle a boolean state.
Downloads
183
Readme
use-toggle
A React hook that offers a shortcut to toggle a boolean state.
Install
npm i @bscop/use-toggle
Usage
import useToggle from "@bscop/use-toggle";
const [state, toggle] = useToggle();
useToggle
also accepts the initial value as argument.
Contribute
Read the guidelines.
Run tests
npm test
Coverage
Coverage reports are hosted on codecov.
npm run badge:coverage -- --token=<guid>
Bruno Scopelliti
www.brunoscopelliti.com