Crate hirola_core
source ·Expand description
hirola-core
Example
use hirola::prelude::*;
use hirola::signal::Mutable;
use hirola::dom::*;
fn counter() -> Dom {
let count = Mutable::new(0i32);
let decrement = count.callback(|s| *s.lock_mut() -= 1);
let increment = count.callback(|s| *s.lock_mut() += 1);
html! {
<>
<button on:click=decrement>"-"</button>
<span>{count}</span>
<button on:click=increment>"+"</button>
</>
}
}
Modules
- Trait for describing how components and other custom types should be rendered into DOM nodes.