I have to say that this is yet another serious flaw in the Swift framework. You have to write your code on the assumption that the initializer for a view may be called multiple times, but this is highly inefficient and it causes a problem where you can easily have race conditions. I see no way to have nested models where an item can link to an array of items, for example, because that requires a query in an initializer that can create an infinite loop.
Combined with Xcode's terrible debugging, this is infuriating.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: