mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
* Move crates to packages/* * Update Cargo.toml * Update links * Fix pull-request.yml * Update examples Cargo.toml * Update relative paths * Update tests * Fix path
31 lines
546 B
Rust
31 lines
546 B
Rust
use yew::prelude::*;
|
|
use yew_functional::function_component;
|
|
|
|
#[derive(Clone, Properties, PartialEq)]
|
|
struct Props {
|
|
a: usize,
|
|
}
|
|
|
|
#[function_component(Comp)]
|
|
fn comp(props: &Props, invalid: String) -> Html {
|
|
html! {
|
|
<p>
|
|
{ props.a }
|
|
{ invalid }
|
|
</p>
|
|
}
|
|
}
|
|
|
|
#[function_component(Comp)]
|
|
fn comp3(props: &Props, invalid: String, another_invalid: u32) -> Html {
|
|
html! {
|
|
<p>
|
|
{ props.a }
|
|
{ invalid }
|
|
{ another_invalid }
|
|
</p>
|
|
}
|
|
}
|
|
|
|
fn main() {}
|