Currently building an app with swiftUI.
Inside my ContentView, I’ve the following code to fetch my CoreData data:
@FetchRequest(
entity: SentenceError.entity(),
sortDescriptors: [
NSSortDescriptor(keyPath: SentenceError.categoryName, ascending: true)
]
) var sentenceErrors: FetchedResults<SentenceError>
Since I use it inside two more views, I’d like to know if it’s better to pass the fetched results as arguments of the view or to refetch my data inside each view.