twoWayBinding
function
Creates a two-way binding.
twoWayBinding
Binding
Creates a two-way binding.
@parampublicName
string
@paramvalue
WritableSignal<unknown>
Writable signal from which to get the current value and to which to write new values.
Usage example
In this example we create an instance of the MyCheckbox
component and bind to its value
input using a two-way binding.
const checkboxValue = signal('');createComponent(MyCheckbox, {bindings: [twoWayBinding('value', checkboxValue),],});
@returns
Binding
Jump to details