1 unstable release
0.1.0 | Feb 25, 2024 |
---|
#987 in WebAssembly
17KB
242 lines
Active DOM
Reactive wasm web framework in Rust.
Usage
Add this crate to your Cargo.toml
file:
[dependencies]
active_dom = "0.1.0"
// main.rs
use active_dom::{create_signal, mount, DOM};
fn main() {
mount(|ctx| {
let count = create_signal(ctx, 1);
DOM::new("div")
.child(
&DOM::new("button")
.text("-")
.on("click", move |_| count.set(count.get() - 1))
)
.dyn_text(ctx, move || count.get().to_string())
.child(
&DOM::new("button")
.text("+")
.on("click", move |_| count.set(count.get() + 1))
)
});
}
trunk serve
Contributing
Contributions are welcome! I would like you to contribute in this project.
Roadmap
This project is in its early stages, and there are many missing features that need implementation. Check the Issues section for a list of features, enhancements, and bug fixes that are planned.
Inspired Of
Greg Johnston's youtube channel and git repo simple-framework.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Dependencies
~7.5–10MB
~181K SLoC