How to clear the DependencyValues? #382
Unanswered
jaganrajj19
asked this question in
Q&A
Replies: 0 comments
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.
-
Hello Guys,
I really need your suggestion here. So let's say I use
ConfigDataSource
as a dependency inside mySignInReducer
.When the user logs out of the app, I want to completely clear the configDataSource from the
DependencyValues._current
so that when the user logs in again, I can reinitialize with new config values.Basically, my goal is to flush out the DepedencyValues completely and start as fresh.
I tried to use withDependencies and wrapped my root reducer as following when the user logs out.
However, it looks like my previous configDataSource never got deallocated. Pls assist. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions