Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about architecture #1

Open
w-i-n-s opened this issue Mar 4, 2021 · 0 comments
Open

Question about architecture #1

w-i-n-s opened this issue Mar 4, 2021 · 0 comments

Comments

@w-i-n-s
Copy link

w-i-n-s commented Mar 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant