useToggle

useToggle is a custom hook for toggling states on and off.
Can be used together with components using controlled state


Usage

useToggle returns methods to activate and deactivate elements in your code as well as its current value. One of the examples where it works can be components like Modal.

Arguments and return value

Previous