I am building an app which displays a proprietary format document.
The document, as well as the custom UIView, is designed for user interaction.
I am using the navigation bar / toolbar to provide commands for interacting with the document (adding, removing objects, etc).
However, on each click/tap on the toolbar, swiftUI is recreating the views. This is totally unnecessary and messes up all data.
Note that there are no @State variables being changed, methods of the document (a pure swift class) are called directly in the action enclosure.
How can I stop swiftui from doing this ?