-
-
Notifications
You must be signed in to change notification settings - Fork 918
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
Am I allowed to ref.watch
in a FutureProvider
across async gap?
#1603
Comments
ref.watch
in a FutureProvider
across async gap?ref.watch
in a FutureProvider
across async gap?
Yes, it is supported, note that the provider will only rebuild when |
Thank you! |
There are no constraints on when to call For example, you can call |
But could those bad practices cause breakage/exceptions or unnecessary widget rebuilds? |
No that should be fine
It'll behave as you would expect: if the watched provider changes, the
widget/provider will rebuild.
Le sam. 10 sept. 2022 à 01:38, Nifesi Odumirin ***@***.***> a
écrit :
… But could those bad practices cause breakage/exceptions or unnecessary
widget rebuilds?
—
Reply to this email directly, view it on GitHub
<#1603 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEZ3I3LDUYY7PFYOKEKX72TV5PC6FANCNFSM6AAAAAAQEEKC74>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
As you mentioned,
But it doesn't seem to be working as expected. Could you please take a look at this question on StackOverflow? |
For example,
If it is supported, maybe the doc can mention it a little bit, because I am familiar with MobX which does not support this. Given popularity of MobX, I guess many people will have the same confusion as me, so doc is helpful.
If it is not supported, then this issue is a feature request :)
The text was updated successfully, but these errors were encountered: