From 471a79da8039f23ee10c9e6e629981c6d4b19e39 Mon Sep 17 00:00:00 2001 From: Yoshinori Imajo Date: Sun, 14 Mar 2021 19:45:16 +0900 Subject: [PATCH] Add id argument to List --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f825a9e..7d33ded 100644 --- a/README.md +++ b/README.md @@ -765,7 +765,7 @@ List { To create dynamic **List** ``` swift let names = ["Thanos", "Iron man", "Ant man"] -List(names) { name in +List(names, id: \.self) { name in Text(name) } ``` @@ -987,7 +987,7 @@ Navigate via tap on List Item ``` swift let names = ["Thanos", "Iron man", "Ant man"] -List(names) { name in +List(names, id: \.self) { name in NavigationLink(destination: HeroView(name: name)) { Text(name) }