You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as 🍏 trying to push using @FetchRequest directly inside views then separation ViewModels right inside view's extension not looking weird anymore. So, I get the idea. But what reason to use singleton everywhere ?
Because you already receive context as a environment variable in SceneDelegate. You can just write directly @Environment(\.managedObjectContext) private var viewContext inside view model.
The text was updated successfully, but these errors were encountered:
As far as 🍏 trying to push using
@FetchRequest
directly inside views then separation ViewModels right inside view's extension not looking weird anymore. So, I get the idea. But what reason to use singleton everywhere ?Because you already receive context as a environment variable in SceneDelegate. You can just write directly
@Environment(\.managedObjectContext) private var viewContext
inside view model.The text was updated successfully, but these errors were encountered: