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

useSWRV does not revalidate if you call mutate and render another component right after #280

Open
edumudu opened this issue Mar 31, 2022 · 0 comments

Comments

@edumudu
Copy link

edumudu commented Mar 31, 2022

First of all, great lib, thanks

If you call the global mutate method and right after render a component that uses useSRWV, the cache is not revalidated

repro codesandbox

Steps To test

  • click on the button "go to Route 2"
  • click on the button "Change cache"
  • click on the button "go to Route 1"

if you open the browser dev tools and go to the networks tab you will see that the request to revalidate is not requested. If you wait a while in the Route 2 before go to Route 1, works fine

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

No branches or pull requests

1 participant