Function yew_hooks::use_mount [−][src]
pub fn use_mount<Callback>(callback: Callback) where
Callback: FnOnce() + 'static, Expand description
A lifecycle hook that calls a function after the component is mounted.
Example
#[function_component(Mount)]
fn mount() -> Html {
use_mount(|| {
debug!("Running effect once on mount");
});
html! {
<>
</>
}
}