Skip to content

How to temporarily pause a provider or temporarily stop listening? #3741

Answered by gdurandrexel
Trung15010802 asked this question in Q&A
Discussion options

You must be logged in to vote

There is ref.listenManual that returns a subscrpition. You could unsubscribe when B is pushed and listen again when B is popped.

But there probably is some problem with your design here: A and B probably shouldn't update the same state if you don't want A to update when the state is changed. The goal of providers is to have things to react to their changes.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Trung15010802
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