1.0.1 • Published 4 years ago
@bscop/use-toggle v1.0.1
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