I am writing my first SwiftUI app which needs to be performing various tasks in the background; such as occasionally fetching data from an API, responding to web socket events, stuff like that.
My question is, where is the best place to kick off such background tasks? One thought is Task block hanging off the WindowGroup but I really have no proper clue. Any resources anyone can recommend about the architecture of SeiftUI apps? I’m following the MVI pattern.