Function dioxus_mobile::launch[][src]

pub fn launch(root: fn(Scope<'_, ()>) -> Option<VNode<'_>>)
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!"}
    })
}