Skip to content
Discussion options

You must be logged in to vote

This definitely looks like a SwiftUI bug to me, so I've converted to a discussion.

Luckily there appear to be 2 workarounds:

  1. You can use @State @FetchAll, which creates a stronger bond between our property wrapper and the view. The caveat is it can be cumbersome to work with nested property wrappers: you need to assign an explicit [] default to the property, and you need to go through $fetch.wrappedValue.load and other endpoints on the @FetchAll.
  2. You can use move the @FetchAll into a model class and use @State var model: Model in the view. This is probably more ergonomic and tends to have less buggy interactions with SwiftUI.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SwiftedMind
Comment options

Answer selected by SwiftedMind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
apple bug Something isn't working due to a bug in Swift or an Apple framework
2 participants
Converted from issue

This discussion was converted from issue #205 on September 21, 2025 19:47.