I just got a problem and I don’t understand why, but when I add the @ObservedResults my body is built 3 times.
import SwiftUI
import RealmSwift
struct SelectedPlaceToAddView: View {
@ObservedResults(Place.self) var places
init(){
print("this message is printed 1 time")
}
var body: some View {
testView()
}
}
struct testView: View {
init(){
print("This message is printed 3 times")
}
var body: some View {
Rectangle().foregroundColor(.blue)
}
}