I have a view model with two properties, a number and a selection. The number is updated once per second and shown on screen.
Beside that on the screen, is a Menu that displays the selection on click. But even though the Menu selection is not updated/affected once per second, the number is, and that seems to break the Menu's highlight state. In fact, it happens even if I put the selection in a separate object all together.
Why is this? How do I make SwiftUI more selective in only updating what's relevant?
struct ContentView: View {
@State var viewModel = ViewModel(number: 111_111, animal: "Horse")