Home > Back-end >  dynamic content not updating in list Swift UI
dynamic content not updating in list Swift UI

Time:06-03

I am having real trouble here. I have a list that I am trying to add a new item to the list each time I add a new line of data to my data file however it is just showing the same data.

I have scoured the internet and even tried following the apple developer site.

Data

List Item

List View

CodePudding user response:

struct ListItem: View {
     var item: VocabItem
      ...  
}

struct VocabList {
     .
     .
     .
       
       ForEach(items) { item in
           ListItem(item: item)
       }
}
  • Related