Skip to content

Instantly share code, notes, and snippets.

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