how do you reload a view screen in a windows 10 mode if the value generated by the foreach method is changed?

I could solve this problem to change the codes like below:

removing @State

InfoRow.swift

import SwiftUI

struct InfoRow: View {
    
    @EnvironmentObject var appState: AppState

    var id: Int
    var name: String
    var memo: String
    
    var body: some View {
             VStack{
               Text(String(id))
               Text(name)
               Text(memo)
             }
    }
}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top