Skip to content

Instantly share code, notes, and snippets.

@SebastianBoldt
Last active February 3, 2022 08:36
Show Gist options
  • Select an option

  • Save SebastianBoldt/9f51e07905acac4471db369ba0d40f8f to your computer and use it in GitHub Desktop.

Select an option

Save SebastianBoldt/9f51e07905acac4471db369ba0d40f8f to your computer and use it in GitHub Desktop.
AsyncAwait.swift
struct SomeView {
var data: Data? {
get async throws {
return await fetchData()
}
}
func fetchData() async throws -> Data? {
// ....
}
func loadData(_ perform: () async throws -> String) {
// .....
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment