I made a mistake in my answer. The @ObservedObject property wrapper is for SwiftUI views. You can't use it in a view model. The following declaration:
@ObservedObject var dataManager = DataManager()
Should be something like
@Published var dataManager = DataManager()
I am not sure what you are asking in your second response. You described what you are trying to do but didn't ask a question.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: