cli icon indicating copy to clipboard operation
cli copied to clipboard

Some errors are not reported

Open ealmloff opened this issue 2 years ago • 0 comments

Some errors are not reported when using dioxus serve. Instead the compilation just lags forever. This seems to be more common when a crate is not compatable with wasm like in the following example:

[package]
name = "dioxus-test"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dioxus = "*"
dioxus-web = "*"
tokio = { version = "*", features = ["full"] }
use dioxus::prelude::*;

fn app(cx: Scope) -> Element {
    let mut count = use_state(&cx, || 0);

    cx.render(rsx!(
        h1 { "High-Five counter: {count}" }
        button { onclick: move |_| count += 1, "Up high!" }
        button { onclick: move |_| count -= 1, "Down low!" }
    ))
}

fn main(){
    dioxus_web::launch(app)
}

ealmloff avatar Jun 22 '23 00:06 ealmloff