I have the following problem I have an array at the beginning empty []
Then later it will be filled if certain things happen.
Anyway, as soon as I start the program I get the following error.
Can anyone help me out?
@State var userArray = []
if(userArray.count > 0) {
Picker("", selection: $user) {
ForEach(userArray, id: \.self) {
Text($0)
}
}.labelsHidden()
}



userArrayarray hold and array of a custom class, orString?