Skip to content

useToggle ​

Category
Utilities

Hook that create toggle

typescript
import { useToggle } from '@siberiacancode/reactuse';

Usage ​

typescript
const [on, toggle] = useToggle();

Demo ​

Api ​

Parameters

NameTypeDefaultNote
values?Value[][false, true]The values to toggle

Contributors ​

Source • Demo