- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
useToggleState
This is a simple hook that can be used to keep track of a boolean value and toggle between its two states.
It can be useful to, for example, display or hide the same FocusModal
component
via multiple triggers, for example, in a table.
Usage#
API Reference#
Call Signature#
useToggleState(initial: boolean = false)
Returns#
Value | Type | Description |
---|---|---|
state | StateData |
Was this page helpful?
Examples#
Entity Name | Actions |
---|---|
foo | |
bar | |
baz |
Was this example helpful?