pub async fn run_with_props<T: 'static + Send>(
    root: Component<T>,
    root_props: T,
    cfg: WebConfig
)
Expand description

Runs the app as a future that can be scheduled around the main thread.

Polls futures internal to the VirtualDOM, hence the async nature of this function.

Example

fn main() {
    let app_fut = dioxus_web::run_with_props(App, RootProps { name: String::from("joe") });
    wasm_bindgen_futures::spawn_local(app_fut);
}