#Force a refresh?

1 messages · Page 1 of 1 (latest)

wicked mortar
#

So later if I do this (that function should be returning true now), it never seems to react to it.


pub fn should_allow_login_submit(&self) -> bool {
    self.received_hello
}

if state.lock().unwrap().should_allow_login_submit() {
    button {
        r#type: "submit",
        "Login"
    }
}

High chance I'm doing something really wrong lol. But anyway here's the full code:

https://github.com/BrianWiz/warhorse/blob/main/warhorse_app/src/main.rs

#

BTW the reason I'm using an Arc<Mutex> is because I was getting runtime errors about dropping runtimes or something, I can dig that back up again

#

That being said I'm okay with explicitly calling some refresh mechanism if it exists

#

hmm I guess the main issue is I'm putting all my state in one spot instead of using the stuff dioxus has. Still new to reactive style coding

#

Ok I think I solved this, I just ended up using signals for those two bools