Skip to main content

Interface: UseControllableStateOptions\<T\>

@arolariu/components


@arolariu/components / hooks/useControllableState / UseControllableStateOptions

Interface: UseControllableStateOptions<T>

Defined in: hooks/useControllableState.tsx:10

Options for configuring controllable state behavior.

Type Parameters​

T​

T

The type of the state value.

Properties​

controlled?​

optional controlled?: T

Defined in: hooks/useControllableState.tsx:14

The controlled value from props. When provided, the component operates in controlled mode.


defaultValue​

defaultValue: T

Defined in: hooks/useControllableState.tsx:18

The default value used when the component is uncontrolled.


onChange?​

optional onChange?: (value) => void

Defined in: hooks/useControllableState.tsx:24

Callback fired when the internal state changes in controlled mode.

Parameters​

value​

T

The new state value.

Returns​

void

// was this page useful?