pub fn launch_cfg(
    root: Component,
    config_builder: impl FnOnce(&mut DesktopConfig) -> &mut DesktopConfig
)
Expand description

Launch the WebView and run the event loop, with configuration.

This function will start a multithreaded Tokio runtime as well the WebView event loop.

You can configure the WebView window with a configuration closure

use dioxus::prelude::*;

fn main() {
    dioxus::desktop::launch_cfg(app, |c| c.with_window(|w| w.with_title("My App")));
}

fn app(cx: Scope) -> Element {
    cx.render(rsx!{
        h1 {"hello world!"}
    })
}