modx 0.1.4

A way to handle states with structs in Dioxus inspired by mobx
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use dioxus::prelude::*;
mod pub_store;
use pub_store::CounterStore;


fn main() {
    launch(app);
}

fn app() -> Element {
    let mut store = CounterStore::new();
    rsx! {
        button { onclick: move |_| store.inc(), "+1" }
        button { onclick: move |_| store.dec(), "-1" }
        "{store.count}"
    }
}