In my IssueListView I have a structure:
struct MyResults: Codable {
var id: Int
var problem: String
var recordDate: String
var isDone: Bool
var finishedDate: String?
var imagePath: String?
}
and a State which is array of the above structure:
@State private var myresults = [MyResults]()
and every thing work fine as I use this array to receive data from API onAppear() and show it as list in the same view.
The problem start when I decide to make a new view (AddTaskView) to add tasks.
the code adding the new task using API successfully, but I have to dismiss the view after that and my list did not updated as the onApear start only once and I don't know how to update the list here inside AddTaskView or to make IssueListView load the data again