use_drop

Function use_drop 

Source
pub fn use_drop(drop: impl FnOnce() + 'static)
Expand description

Run a callback for when the component gets dropped. Useful to clean resources.

use_drop(|| {
    println!("Dropping this component.");
});