yew/packages/yew-macro/tests/function_component_attr/mut-ref-props-param-fail.rs
2025-07-21 10:06:41 +09:00

18 lines
233 B
Rust

use yew::prelude::*;
#[derive(Clone, Properties, PartialEq)]
struct Props {
a: usize,
}
#[component(Comp)]
fn comp(props: &mut Props) -> Html {
html! {
<p>
{ props.a }
</p>
}
}
fn main() {}