effect

Function effect 

Source
pub fn effect<F>(f: F) -> Dispose
where F: FnOnce() -> Dispose + 'static,
Expand description

Mimic Compose side-effect. You call effect(|| { …; on_unmount(…) })