Function leptos_dom::mount
source · pub fn mount<T, F>(parent: HtmlElement, f: F)where
F: Fn(Scope) -> T + 'static,
T: Mountable,
Expand description
Runs the given function to mount something to the given element in the DOM.
// a very simple Leptos application
mount(
document().get_element_by_id("root").unwrap().unchecked_into(),
|cx| view! { cx, <p>"Hello, world!"</p> }
);