Instance properties of a view is very private (adding public makes no sense) as the instance of the view is sort of temporal template which will be recreated at any time.
One way, is to declare the variable independently from the view and use it in the view and other frameworks.
Hard to say any details unless knowing how you want to use the variable.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: