Open
Description
Describe the bug
#[component]
pub fn PersonView(#[prop(into)] person: Field<Person>) -> impl IntoView {
view! {
{move || {
trace!("Person name get");
if person.is_disposed() {
"Person disposed".to_string()
} else {
let name = person.name(); // type Subfield<Field<Person>, Person, String>, according to rust-analyzer
trace!("Got name");
if name.is_disposed() {
trace!("Name disposed");
"Person::name disposed".to_string()
} else {
trace!("Name not disposed");
let result = name.try_get().unwrap();
trace!("result: {result}");
result
}
}
}}
}
}
My code prints:
Person name get
Got name
Name not disposed
panicked at ...:
called `Option::unwrap()` on a `None` value
Meaning, name
is not disposed, but cannot be gotten anyways.
I'll try to make an MWE if I find the time.
Leptos Dependencies
leptos = { version = "0.7.8", features = ["csr"] }
reactive_stores = "0.1.8"