mediumStudy question · answer published in iOS interview questions, so no pointsswiftuiswift-concurrency
SwiftUI .task when leaving a screen
A SwiftUI view loads data with .task { await vm.load() }. The user navigates away before loading finishes. What happens?
Discussion 0
Join free to post in the discussion.
Related questions
- Layering views in SwiftUIMobile App Developer
- What await means in SwiftMobile App Developer
- Closing a sheet from inside itMobile App Developer
- ForEach over a custom structMobile App Developer
- Using a SwiftUI view in UIKitMobile App Developer
- Previewing a SwiftUI viewMobile App Developer
- @State vs @Binding in SwiftUIMobile App Developer
- Owning an @Observable modelMobile App Developer