By default, any code that you run in response to a UI event in SwiftUI will run on the main thread. Since a lot of our code deals with updating other UI elements in response to some user interaction, this is fine in most cases. For example, you might want to validate the user’s input to make sure they filled out all required fields of a multistep form. This is a memory-bound process that runs fast enough to be executed on the main thread without causing any issues.
However, once you want ...