SwiftUI - ObservableObject created multiple times
问题 I have created an ObservableObject in a View. @ObservedObject var selectionModel = FilterSelectionModel() I put a breakpoint inside the FilterSelectionModel 's init function and it is called multiple times. Because this View is part of a NavigationLink , I understand that it gets created then and along with it, the selectionModel. When I navigate to the View, the selectionModel is created again. In this same View I have a "sub View" where I pass the selectionModel as an EnvironmentObject so