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

[invalidatesTags] - Executed many requests instead of one #4637

Open
shalev312 opened this issue Sep 22, 2024 · 2 comments
Open

[invalidatesTags] - Executed many requests instead of one #4637

shalev312 opened this issue Sep 22, 2024 · 2 comments

Comments

@shalev312
Copy link

Way to introduce:

  1. Config get request on the page (for example 'home' page)
  2. Config others get requests on the same page (for example 'home' page)
  3. Config action that invalidates the cache using the 'invalidatesTags' configuration
  4. Use the action that invalidates the cache on the same 'home' page
  5. The get request calls many times.
  • The Query is placed and called only in one place on the root of the page
  • The project is in React
Screenshot 2024-09-22 at 10 27 37 image image
@markerikson
Copy link
Collaborator

Afraid this isn't enough information to understand what might be going on. Can you provide a CodeSandbox or a repo that shows this happening?

@shalev312
Copy link
Author

I will create an example later and will update it here :)

Also, I verified "@reduxjs/toolkit": "1.9.5" and "react-redux": "8.1.3", and there the issue does not show up

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

No branches or pull requests

2 participants