Function dioxus_web::launch_cfg
source · pub fn launch_cfg(root: fn(_: Scope<'_>) -> Element<'_>, config: Config)Expand description
Launch your app and run the event loop, with configuration.
This function will start your web app on the main web thread.
You can configure the WebView window with a configuration closure
ⓘ
use dioxus::prelude::*;
fn main() {
dioxus_web::launch_with_props(App, Config::new().pre_render(true));
}
fn app(cx: Scope) -> Element {
cx.render(rsx!{
h1 {"hello world!"}
})
}