Function leptos_reactive::on_cleanup

source ยท
pub fn on_cleanup(cleanup_fn: impl FnOnce() + 'static)
Expand description

Creates a cleanup function, which will be run when the current reactive owner is disposed.

It runs after child nodes have been disposed, but before signals, effects, and resources are invalidated.