Junior — Senior
Creating a custom hook useBooleanState for managing boolean state
livecode
Task condition
Implement a custom hook useBooleanState that manages and modifies a boolean value. The hook should return the current value and a set of convenient functions for toggling, setting to true, and setting to false, replacing the usual call to useState(false). Keep the original signatures and types, and you can name any auxiliary variables differently, but leave the hook code itself unchanged.