One issue I've had is that when writing tests, it's easy to run into problems caused by react-query's caching. It would be good to have an option to disable caching wholesale.
As stated in the docs you can play with cacheTime option
If and when a query is no longer being used, it becomes inactive and by default is cached in the background for 5 minutes. This time can be configured using the cacheTime option at both the global and query-level.
By setting cacheTime to 0 in the options, you can disable caching in a specific query but by setting this to the react-query's provider, you can disable caching for every query
Most helpful comment
As stated in the docs you can play with cacheTime option
By setting cacheTime to 0 in the options, you can disable caching in a specific query but by setting this to the react-query's provider, you can disable caching for every query