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

Should useRevalidator be stable? #10706

Closed
brophdawg11 opened this issue Jul 14, 2023 Discussed in #10702 · 2 comments · Fixed by #10707
Closed

Should useRevalidator be stable? #10706

brophdawg11 opened this issue Jul 14, 2023 Discussed in #10702 · 2 comments · Fixed by #10707
Labels

Comments

@brophdawg11
Copy link
Contributor

Discussed in #10702

Originally posted by charliematters July 14, 2023
I've got a hook which calls useRevalidator and ReactQuery's invalidateQueries to allow any component to refresh data.

I'm currently chasing down some unnecessary re-renders, and my useRevalidator hook is returning a new value each time.

The docs imply that it's a singleton under the hood, so I'd assumed that we could rely on useRevalidator not changing.

Have I misunderstood how this works?

@brophdawg11 brophdawg11 linked a pull request Jul 17, 2023 that will close this issue
@brophdawg11 brophdawg11 added bug awaiting release This issue have been fixed and will be released soon labels Jul 19, 2023
@brophdawg11
Copy link
Contributor Author

This is resolved by #10707 and should be available in the next release

@brophdawg11
Copy link
Contributor Author

We just published version 6.15.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

@brophdawg11 brophdawg11 removed the awaiting release This issue have been fixed and will be released soon label Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant