You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type annotations needed
multiple `impl`s satisfying `std::option::Option<_>: IntoPropValue<std::option::Option<std::string::String>>` found in the `yew` crate:
- impl IntoPropValue<std::option::Option<std::string::String>> for std::option::Option<&'static str>;
- impl<T> IntoPropValue<T> for T
Could anybody bring me some light on this matter, how to set an optional prop ?
Environment:
Yew version: [ master]
Rust version: [1.81.1]
Target [wasm32-unknown-unknown]
Build tool [trunk]
The text was updated successfully, but these errors were encountered:
@arcollector this is probably an issue with how the html!() macro parses things, but you can still use the fully annotated Option syntax: id_patient={Option::<String>::None}.
However, it may or may not be more appropriate to use one of the #[prop_or...] derive macros and simply omit the parameter:
Problem
Hello there, I have this simple code
the compiler outputs the following the error
Could anybody bring me some light on this matter, how to set an optional prop ?
Environment:
master
]1.81.1
]wasm32-unknown-unknown
]trunk
]The text was updated successfully, but these errors were encountered: