I'm having issues porting my app to master to prepare for 0.5 so I tried to start from the template using dx create and I modified it to use the master branch as follows, but nothing is displayed on the page and no error is shown in the firefox console:
#![allow(non_snake_case)]
use dioxus_router::prelude::*;
use dioxus::prelude::*;
use log::LevelFilter;
fn main() {
// Init debug
dioxus_logger::init(LevelFilter::Info).expect("failed to init logger");
console_error_panic_hook::set_once();
log::info!("starting app");
dioxus::prelude::launch(app);
}
fn app() -> Element {
rsx! { Router::<Route> {} }
}
#[derive(Clone, Routable, Debug, PartialEq)]
enum Route {
#[route("/")]
Home {},
}
#[component]
fn Home() -> Element {
let mut count = use_signal(|| 0);
rsx! {
h1 { "High-Five counter: {count}" }
div {
h1 { "High-Five counter: {count}" }
button { onclick: move |_| count += 1, "Up high!" }
button { onclick: move |_| count -= 1, "Down low!" }
}
}
}
[dependencies]
dioxus = { git = "https://github.com/DioxusLabs/dioxus", branch = "master", features = ["router"]}
dioxus-router = { git = "https://github.com/DioxusLabs/dioxus", branch = "master", features = ["web"]}
dioxus-web = { git = "https://github.com/DioxusLabs/dioxus", branch = "master"}