Function leptos_reactive::on_cleanup
source · pub fn on_cleanup(cx: Scope, cleanup_fn: impl FnOnce() + 'static)
Expand description
Creates a cleanup function, which will be run when a Scope is disposed.
It runs after child scopes have been disposed, but before signals, effects, and resources are invalidated.