Crates.io | hobo |
lib.rs | hobo |
version | 0.4.0 |
source | src |
created_at | 2020-07-21 15:28:47.755603 |
updated_at | 2023-07-27 13:41:25.124832 |
description | hobo is a Rust frontend framework |
homepage | |
repository | https://github.com/grdigital/hobo |
max_upload_size | |
id | 267660 |
size | 111,814 |
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)
)
}