I had a similar problem and your reply help me.
HStack{
// any code
}.onChange(of: "(a.id)-(b.id)"){new in
if("\(a.id).-\(b.id)" != new){
// do something
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: