#[component]
Expand description
Macro which transforms a provided function into a component that can be used in dom! macro
use vertigo::prelude::*;
#[component]
pub fn Header(name: Value<String>) {
dom! {
<div>"Hello" {name}</div>
}
}
let name = Value::new("world".to_string());
dom! {
<div>
<Header name={name} />
</div>
};