DEV Community


Posted on

Answer: How to tell SwiftUI views to bind to nested ObservableObjects

I liked solution by sorin-lica. Based upon that I've decided to implement a custom Property Wrapper (following this amazing article) named NestedObservableObject to make that solution more developer friendly.

This allow to write your model in the following way

class Submodel: ObservableObject {
  @Published var count = 0

Top comments (0)