Toggle hook which accepts initial state and returns the toggle state and controls.
Optional
Toggle value and controls
const { state, disable, enable, set, toggle } = useToggle(initalState); Copy
const { state, disable, enable, set, toggle } = useToggle(initalState);
Toggle hook which accepts initial state and returns the toggle state and controls.