redux-toolkit
redux-toolkit copied to clipboard
[invalidatesTags] - Executed many requests instead of one
Way to introduce:
- Config get request on the page (for example 'home' page)
- Config others get requests on the same page (for example 'home' page)
- Config action that invalidates the cache using the 'invalidatesTags' configuration
- Use the action that invalidates the cache on the same 'home' page
- 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
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?
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