Crates.io | hobo_derive |
lib.rs | hobo_derive |
version | 0.4.0 |
source | src |
created_at | 2020-07-21 15:25:54.595203 |
updated_at | 2023-07-27 13:37:20.724015 |
description | hobo is a Rust frontend framework |
homepage | |
repository | https://github.com/grdigital/hobo |
max_upload_size | |
id | 267657 |
size | 6,597 |
hobo is an opinionated, batteries-included Rust frontend framework. Works on stable Rust.
STILL WIP although used in production by GR Digital.
Check out the Book!
web_sys::HtmlElement
pub use hobo::{
prelude::*,
create as e,
signals::signal::{Mutable, SignalExt}
};
fn counter() -> impl hobo::AsElement {
let counter = Mutable::new(0);
e::div()
.class((
css::display!(flex),
css::flex_direction!(column),
css::width!(400 px),
))
.child(e::div()
.text_signal(counter.signal().map(|value| {
format!("Counter value is: {value}")
}))
)
.child(e::button()
.text("increment")
.on_click(move |_| *counter.lock_mut() += 1)
)
}