SwiftUI's ObservableObject causes unnecessary view re-renders when any published property changes, even if that property isn't used by a particular view. The newer @Observable macro solves this by only re-rendering views that actually depend on the changed property, making it a more efficient replacement for ObservableObject with @Published variables.

2m watch time

Sort: