@bscop/use-toggle
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

use-toggle

GitHub license npm version CircleCI Status Coverage

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

Readme

Keywords

none

Package Sidebar

Install

npm i @bscop/use-toggle

Weekly Downloads

96

Version

1.0.1

License

MIT

Unpacked Size

11.6 kB

Total Files

9

Last publish

Collaborators

  • brunoscopelliti