Moving the scope of the declared dependency changes outcome unexpectedly. #370
Replies: 1 comment 1 reply
-
Hi @nashysolutions, dependencies are not meant to be used in views. SwiftUI does not open up enough of the internals of views to allow something like We've also never stated that dependencies should be used in views. Is there a reason you are not using Also, this discussion seems almost identical to #369. Perhaps you can close that one and focus the conversation in just this one? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I appreciate the single entry point system and how dependencies can be scoped, but this still seems like a trap. Should we declare dependencies at the highest scope in a view, to be safe?
If I make this change, the outcome is unexpected at runtime.
Beta Was this translation helpful? Give feedback.
All reactions