Function leptos_dom::mount_to_body

source ·
pub fn mount_to_body<T, F>(f: F)where
    F: Fn(Scope) -> T + 'static,
    T: Mountable,
Expand description

Runs the given function to mount something to the <body> element in the DOM.

// the simplest Leptos application
mount_to_body(|cx| view! { cx,  <p>"Hello, world!"</p> });