Relative Content

Tag Archive for swiftasynchronousswiftui

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.