Using AnyView in SwiftUI to satisfy the compiler by wrapping conditional branches hides real view types, causing SwiftUI to lose track of view identity. This leads to broken diffing and views that stop refreshing after some time. The fix is to replace AnyView with proper enums with associated views, which gives SwiftUI a stable structure to work with.

1m watch time

Sort: