SwiftUI Best ways to prevent onChange from executing until values have loaded
I’m trying to observe some state variables, of which are set/loaded when the entire view appears using .onAppear()
. Problem is, this onChange
is firing when the user loads the view without editing the @State
variables due to my .onAppear
updating the state variables after some synchronous/asynchronous task.
How to execute function after asynchronous function
I am currently programming an app that uses Firebase as a database.