mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
30 lines
488 B
Rust
30 lines
488 B
Rust
use yew::prelude::*;
|
|
|
|
#[derive(Clone, Properties, PartialEq)]
|
|
struct Props {
|
|
a: usize,
|
|
}
|
|
|
|
#[component(Comp)]
|
|
fn comp(props: &Props, invalid: String) -> Html {
|
|
html! {
|
|
<p>
|
|
{ props.a }
|
|
{ invalid }
|
|
</p>
|
|
}
|
|
}
|
|
|
|
#[component(Comp)]
|
|
fn comp3(props: &Props, invalid: String, another_invalid: u32) -> Html {
|
|
html! {
|
|
<p>
|
|
{ props.a }
|
|
{ invalid }
|
|
{ another_invalid }
|
|
</p>
|
|
}
|
|
}
|
|
|
|
fn main() {}
|