Skip to main content

batch

Function batch 

Source
pub fn batch<T>(f: impl FnOnce() -> T) -> T
Expand description

Defers any ImmediateEffects from running until the end of the function.

NOTE: this affects only ImmediateEffects, not other effects.

NOTE: this is rarely needed, but it is useful for example when multiple signals need to be updated atomically (for example a double-bound signal tree).