-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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`
Metadata
Metadata
Assignees
Labels
No labels