@epikodelabs/streamix / vue/src/public-api / useWritable
Function: useWritable()
useWritable<
T>(source):WritableComputedRef<T>
Defined in: projects/libraries/streamix/vue/src/lib/useWritable.ts:25
Binds a Streamix Writable to Vue as a writable computed ref.
Reads stay synchronized through useIterable; writes go directly to the Streamix source. This makes the result work naturally with v-model without copying Streamix state into Vue state.
Type Parameters
T
T
Parameters
source
Writable<T>
Returns
WritableComputedRef<T>
Example
ts
const count = useWritable(counter);
count.value++;html
<input v-model="name">