Skip to content
Discussion options

You must be logged in to vote

Hi @acosmicflamingo, what you are trying to accomplish is not immediately possibly unfortunately. And the reason it is not possible is because dependencies are built on the back of @TaskLocal which has very strict rules for how you are allowed to change a value.

I highly recommend you read the following articles from the documentation to get a deep understanding of why:

So, it's not a limitation of the library, but rather a core tenet of how the library is designed.

When you access @Dependency from the UIButton, you are doing so in a scope that is completely untethered to the scope where the original dependencies were set, and…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@acosmicflamingo
Comment options

@acosmicflamingo
Comment options

@mbrandonw
Comment options

Answer selected by acosmicflamingo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants