Skip to content
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

Refetch should not happen if no active subscribers #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AlexanderArvidsson
Copy link
Owner

@AlexanderArvidsson AlexanderArvidsson commented Jan 29, 2022

Fixes reduxjs#1530

All logic that checks if there are active subscriptions in the code does a falsey check as well as a keys length check on the subscription sub state, except for the code that refetches valid queries.
Here is an example from the handleUnsubscribe function.
Here is another from invalidateTags.
This PR includes the same check to resolve this issue. See reduxjs#1530 for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RTK Query - refetchOnFocus refetches unmounted queries
1 participant