Skip to main content

watch

Function watch 

Source
pub fn watch<S: Clone + 'static>(
    source: impl Fn() -> S + 'static,
    cb: impl Fn(&S, Option<&S>) + 'static,
)
Expand description

Derive-state without effect-write loops (§4.2): source is tracked; cb runs untracked with (new, old). Does NOT fire for the initial value.

Day API ↩ Guides· daybrite.dev