Replies: 3 comments 1 reply
-
Don't use the same provider, create 2 providers for 2 different states since, clearly, they do not represent the same thing. Alternatively you could use |
Beta Was this translation helpful? Give feedback.
-
You're free to use both watch and listen on the same provider. |
Beta Was this translation helpful? Give feedback.
-
My understanding of the problem here is that the same provider provides a state containing values that track popup notifications and others that are used to build a widget content: if the state is updated to "notify" a popup notification then the widget is also rebuilt, which is not wanted. |
Beta Was this translation helpful? Give feedback.
-
So I listen to the provider for things like navigation and show popup and use watch for changes to a widget state.
But whats best practice for the watch to not react to a listen state?
So if I emit down
showPopup
the watch still need to react to this when in-fact there is no state change and it should carry on showing its current state (widget)'showpopup' is strictly for the listen to react to.
Beta Was this translation helpful? Give feedback.
All reactions