-
The default behaviour of react-query seems to be to use the cache if it's there, and additionally also run the API fetch function again. Which is perfect! However, when I set retry to 0 (due to how our API handles expired sessions):
Suddenly, react-query only relies on the cache and does not fetch from the network any more. Can someone please explain this to me? Can you toggle back on the default behaviour, or only set retry to false for requests where there was an actual error (like 401)? Maybe I also don't quite understand the thing, as I just recently started using react-query, so please bear with me🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Can you show a codesandbox reproduction because that doesn't sound like the expected behavior |
Beta Was this translation helpful? Give feedback.
Can you show a codesandbox reproduction because that doesn't sound like the expected behavior