useBinding

Creates a Binding object that can be used to read and write to a value. Components can recieve a binding as a prop and can handle the logic of getting and setting the value from inside the component.

Declaration

React
function useBinding<T>(initialValue: T)

Parameters

  • initialValue*T

Return value

A Binding containing the value and a setter function.

See also

More in Hooks.