There's not currently a native way to do this in the framework. Your snippet is the best workaround I'm aware of.
Please file a feedback report requesting a more ergonomic way to achieve this – that actually would be appreciated!
Topic:
SwiftUI
SubTopic:
SwiftUI Q&A