Code review: async loading in a UIViewController
Task
Review this code:
override func viewDidLoad() {
// setup tableView
Task {
do {
self.dataSource = try await self.service.fetchAdverts()
self.tableView.reloadData()
} catch {
return
}
}
}
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep