I have the same issue, looks like there is bug that the context is not updated.
Post
Replies
Boosts
Views
Activity
Xcode Beta 15.1 the issue is still here.
There is workaround how to avoid crash
var nameBinding: Binding<String>? {
guard let name = viewModel.name else { return nil }
return Binding {
name
} set: { value in
viewModel.name = value
}
}
...
if let name = nameBinding {
ChildView(selectedName: name)
}
...
Here is some other suggestions
https://stackoverflow.com/questions/76241232/binding-with-optional-value-causes-runtime-crash/76243321#76243321
this issue can also be produced without @Environment https://stackoverflow.com/questions/75007473/swiftui-picker-with-style-navigationlink-causes-100-cpu-usage
You should keep Reuse identifier empty in your xib file