In my (larger project app) the class collecting the messages is a Singleton and not strictly owned by the UI. The static var shared = Messages() should take care of the reference so that @StateObject would be wrong here.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: