Function dioxus_desktop::launch

source ·
pub fn launch(root: Component)
Expand description

Launch the WebView and run the event loop.

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

use dioxus::prelude::*;

fn main() {
    dioxus_desktop::launch(app);
}

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