useDisclosure
A hook to control open/close state.
#
Import#
Return valueThe useDisclosure
hook returns an object with the following properties:
Name | Type | Default | Description |
---|---|---|---|
isOpen | boolean | false | The current state of the hook. |
close | function | Changes the state to false . | |
open | function | Changes the state to true . | |
toggle | function | Toggles the state between true and false . |
#
UsageResult
SyntaxError: Unexpected token (1:8) 1 : return () ^
Live Editor