frontend
Preparing search index...
hooks/useLocalStorageToggle
useLocalStorageToggle
Function useLocalStorageToggle
useLocalStorageToggle
(
key
:
string
,
defaultValue
:
boolean
,
)
:
[
boolean
,
(
value
:
boolean
)
=>
void
]
A hook that persists a boolean toggle in localStorage.
Parameters
key
:
string
defaultValue
:
boolean
Returns
[
boolean
,
(
value
:
boolean
)
=>
void
]
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
frontend
Loading...
A hook that persists a boolean toggle in localStorage.