Skip to content

Variable: watch

ts
const watch: WatchDirectiveFunction;

Defined in: @lit-labs/signals:

Renders a signal and subscribes to it, updating the part when the signal changes.

watch() can only be used in a reactive element that applies the SignalWatcher mixin.