Replies: 1 comment
-
If you really want a new state each time you watch the provider, you can make it a family provider, taking an Object as parameter, and pass a new Object each time you watch it. Be sure to make it autodispose though. Otherwise, you may want to ensure that apiProvider is also autodispose, in which case it will be disposed when TestProvider is disposed, and if no one else is watching it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So my original code looked a bit like this..
The problem is that when TestProvider is autodisposed
apiService
is not refreshed/invalidatedSo my fix is...
Is that ok? I could not find a means to overide the autodispose and do the invalidate there.
Beta Was this translation helpful? Give feedback.
All reactions