Home > @pago/reactive > Ref

Ref interface

A tracked reference to a value. Reading it from it should mark it as “read” in the current scope, writing to it should mark it as dirty.

When a Ref is marked as dirty, any watcher or derivative will eventually be updated to its new value.

Note that it is not possible to read and update a ref within the same tracked scope.

Signature:

export interface Ref<T> extends ReadonlyRef<T> 

Extends: ReadonlyRef<T>

Properties

Property Type Description
current T