this works:
#[derive(PartialEq, Properties)]
pub struct FooProps {
#[cfg(feature = "foo")]
pub foo: bool,
}
#[function_component]
pub fn Foo(props: &FooProps) -> Html {
html! {}
}
but this doesn't compile when the cfg is not satisfied:
#[autoprops]
#[function_component]
pub fn Foo(#[cfg(feature = "foo")] foo: bool) -> Html {
html! {}
}
it fails with
struct `app::FooProps` does not have a field named `foo`
this works:
but this doesn't compile when the cfg is not satisfied:
it fails with