This pattern is not recommended with didSet subscribe to their changes instead. The patterns in the code don't follow the SwiftUI paradigm.
@State var whatsNew = Array<String>() {
didSet {
print("what's new array set, newRefreshIndicator = \(newRefreshIndicator)")
newRefreshIndicator = false
if !newPopup {
newPopup = true
}
}
}
@Binding var setMock: [Restaurants] {
didSet {
print("dataSet")
// yes.restList.removeAll()
joining = false
print("searchRest = \(search)")
print("mock = \(restMock)")
search = true
creating = false
joining = false
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: