I want to add a "didSet" function to a parameter of a SwiftUI's View struct, but every time I try to build the app I get the "Segmentation fault: 11" error.
I tried to rename the parameter, but nothing happened. I also tried to make it Optional but because it's a @State it didn't worked. What can I do?
@State var text: String {
didSet {
print(oldValue, text)
}
}