I tested on macOS 27b1 and the issue still exists, that is no animation. Furthermore, none of my workarounds including your suggestion work anymore, even on macOS 26.5.1. While this animates perfectly fine on iOS:
func updateUIView(_ uiView: UIView, context: Context) {
let targetColor = toggle ? UIColor.red : UIColor.blue
context.animate {
uiView.backgroundColor = targetColor
}
}
FB22270146
Topic:
SwiftUI
SubTopic:
SwiftUI Q&A