UseControlledStateOptions
Defined in: src/hooks/useControlledState/useControlledState.ts:7
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”defaultValue?
Section titled “defaultValue?”
optionaldefaultValue?:T
Defined in: src/hooks/useControlledState/useControlledState.ts:11
Default value used when the hook is uncontrolled.
fallback
Section titled “fallback”fallback:
T
Defined in: src/hooks/useControlledState/useControlledState.ts:15
Fallback used when both value and defaultValue are undefined.
onChange?
Section titled “onChange?”
optionalonChange?: (value) =>void
Defined in: src/hooks/useControlledState/useControlledState.ts:13
Called when the consumer requests a change in either mode.
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”void
value?
Section titled “value?”
optionalvalue?:T
Defined in: src/hooks/useControlledState/useControlledState.ts:9
Controlled value — when defined, drives the returned value.