Closed kirillsemyonkin closed 10 months ago
As of writing, yew-autoprops uses panic!() macro to display errors to the user. This, however, is not intended and causes jarring error:
yew-autoprops
panic!()
#[autoprops_component] pub fn Example(i: u32) -> Html { html! {} } #[function_component] pub fn App() -> Html { html! { <Example i={ 0 } /> } }
Error:
custom attribute panicked message: Invalid argument: i : u32 (must be a reference)
compile_error!()
As of writing,
yew-autoprops
usespanic!()
macro to display errors to the user. This, however, is not intended and causes jarring error:Error:
Possible Solutions
compile_error!()
instead ofpanic!()
ing, this should cause a proper simple error to be displayed to the user of the library.