Created
June 13, 2021 21:22
-
-
Save mhijack/532be08eec0ac5b717e0e4cf4dd5f4cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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