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