Function leptos::try_batch

source ยท
pub fn try_batch<T>(f: impl FnOnce() -> T) -> Result<T, ReactiveSystemError>
Expand description

Attempts to batch any reactive updates, preventing effects from running until the whole function has run. This allows you to prevent rerunning effects if multiple signal updates might cause the same effect to run.

Unlike batch, this will not panic if the runtime has been disposed.