useToggle

Toggle a boolean value on or off with handlers

const [state, setOn, setOff, toggle] = useToggle(initialState, handlers);

Sample Usage

Basic Usage