Closed cecton closed 12 months ago
This change will allow the user to customize the name of the Properties struct. Most of the time the user won't care so the default will be as before but in case they do care (when making libraries of components for example), this is now possible.
use yew_autoprops::autoprops_component; use yew::prelude::*; #[autoprops_component(CoolComponent, CoolProps)] fn cool_component(#[prop_or_default] test: &i8, smth: &usize) -> Html { println!("test: {}", test); html! { <div> <p>{ smth }</p> </div> } } impl CoolProps { fn foo() { } }
Oops sorry i didnt see the check!
Released as 0.3.0. Maybe update the README too if you have the time ;-)
This change will allow the user to customize the name of the Properties struct. Most of the time the user won't care so the default will be as before but in case they do care (when making libraries of components for example), this is now possible.