Imagine a component like so:
#[autoprops_component]
pub fn Example<T: 'static>() -> Html {
html! {}
}
As T is not used, Rust complains:
parameter `T` is never used
consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
- Is
Properties (generic) struct still generated despite having no props?
At least, currently solvable with following code:
#[autoprops_component]
pub fn Example<T: 'static>(#[prop_or_default] _never: &PhantomData<T>) -> Html {
html! {}
}