useToggle
useToggle is a custom hook for toggling states on and off.

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