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

Replace custom useQuery #822

Open
fengelniederhammer opened this issue Jun 28, 2023 · 0 comments
Open

Replace custom useQuery #822

fengelniederhammer opened this issue Jun 28, 2023 · 0 comments

Comments

@fengelniederhammer
Copy link
Contributor

We use a self-written useQuery hook for fetching data from servers. This has several drawbacks:

  • Caching does not work properly. On the first call, it still returns old data, see e.g. here: 3ddd9c8.
  • We have to maintain it ourselves. There are viable, well maintained solutions.
  • We don't have good control over cache lifetime.

I'd suggest to use this:
https://tanstack.com/query/v4/docs/react/reference/useQuery
https://github.com/TanStack/query

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