mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
22 lines
283 B
Rust
22 lines
283 B
Rust
use yew::prelude::*;
|
|
|
|
#[derive(Clone, Properties, PartialEq)]
|
|
struct Props {
|
|
a: usize,
|
|
}
|
|
|
|
#[function_component]
|
|
fn Comp(props: &Props) -> Html {
|
|
html! {
|
|
<p>
|
|
{ props.a }
|
|
</p>
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let _ = html! {
|
|
<Comp a={0} />
|
|
};
|
|
}
|