Open 01-binary opened 11 months ago
I also experienced issues with refetchOnMounrOrArgChange. I would prefer the re-fetch to happen immediately along with the setting of 'isFetching' to true. When I move from page A to page B, both using the same query, and set refetchOnMountOrArgChange to true in page B's code, the useQuery hook initially returns cached data with false isFetching and setting it to true only after the first render circle, as a result of which I end up having seemingly 'fresh' data on the initial render as there is no indication (other than the last fetch timestamp), that this data is actually not up to date and is about to be re-fetched
Discussed in https://github.com/reduxjs/redux-toolkit/discussions/3638