frontend
Preparing search index...
hooks/useGameConfig
useGameConfig
Function useGameConfig
useGameConfig
<
T
extends
object
>
(
defaultConfig
:
T
,
)
:
{
config
:
T
;
handleConfigChange
:
(
key
:
NumberKeys
<
T
>
,
value
:
string
)
=>
void
;
handleToggle
:
(
key
:
BooleanKeys
<
T
>
,
value
:
boolean
)
=>
void
;
setConfig
:
Dispatch
<
SetStateAction
<
T
>
>
;
}
Generic hook for managing game configuration state with number parsing and boolean toggling.
Type Parameters
T
extends
object
Parameters
defaultConfig
:
T
Returns
{
config
:
T
;
handleConfigChange
:
(
key
:
NumberKeys
<
T
>
,
value
:
string
)
=>
void
;
handleToggle
:
(
key
:
BooleanKeys
<
T
>
,
value
:
boolean
)
=>
void
;
setConfig
:
Dispatch
<
SetStateAction
<
T
>
>
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
frontend
Loading...
Generic hook for managing game configuration state with number parsing and boolean toggling.