use dioxus::prelude::*;
fn main() {
let app = dioxus_webview::new::<()>(|ctx| {
let (count, set_count) = use_state(ctx, || 0);
html! {
"Dioxus Desktop Demo"
"Count is {count}"
}
});
app.launch(());
}
fn use_state(ctx: &mut Context, init: impl Fn() -> T) -> (T, impl Fn(T)) {
let g = init();
(g, |_| {})
}