Skip to content

Function: useStateBinding()

API / @xmachines/play-solid / useStateBinding

function useStateBinding<T>(path): [Accessor<T | undefined>, (value) => void];

Defined in: @xmachines/json-render-solid

The value of the state at path, and a setter of it.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
pathstring | Accessor<string | undefined>The path, or an accessor of the path (see useStateValue).

Returns

[Accessor<T | undefined>, (value) => void]