pub fn launch(root_component: Component)
Expand description

Launch the VirtualDOM given a root component and a configuration.

This function expects the root component to not have root props. To launch the root component with root props, use launch_with_props instead.

This method will block the thread with spawn_local from wasm_bindgen_futures.

If you need to run the VirtualDOM in its own thread, use run_with_props instead and await the future.

Example

fn main() {
    dioxus_web::launch(App);
}

static App: Component = |cx| {
    rsx!(cx, div {"hello world"})
}