Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mhijack/ace016b75a4e18d02b3b2b039b63c1d1 to your computer and use it in GitHub Desktop.
Save mhijack/ace016b75a4e18d02b3b2b039b63c1d1 to your computer and use it in GitHub Desktop.
struct Book {
var id: String
var name: String
}
struct ContentView: View {
private var books: [Book] = []
var body: some View {
List {
ForEach(books, id: \.id) { book in
Text(book.name)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment