One-way data binding from @ObservedObject with SwiftUI

If it's read-only, you should pass it as normal let value:

struct ContentView: View {
    @ObservedObject private var counter: Counter = .init()
    var body: some View {
        VStack {
            NumberDisplay(number: counter.count)
            ...
        }
    }
}

struct NumberDisplay: View {
  let number: Int
  private let superCoolFont: Font = .system(.largeTitle)
    
  ...
}

PS:

Apple's framework, like SwiftUI, should actually be on Apple Developer Forums

3 Likes