I have a parent view which does a @SectionedFetchRequest
and passes the SectionedFetchResults
to a child view. Everything works, and the child view is able to parse through the SectionedFetchResults
. However, I can't figure out how to set up the data so that the child's Previews struct will work. What's the proper way to set up some constant data in Previews struct so that I can instantiate the child view and pass in SectionedFetchResults
?
See this similar question for a FetchedResults: Passing Core Data FetchedResults for previews in SwiftUI