-
Using this example: https://tanstack.com/query/v4/docs/react/examples/react/star-wars when we navigate between pages, the cached data are visible in the devtools. But in my app with pretty much the same configuration, when I navigate away from a page, I can see the cache disappearing in the devtools . I don't understand why. Does someone have an idea? the issue is pretty similar to this one: https://www.reddit.com/r/reactjs/comments/uqd6g3/react_query_clearing_cache_when_navigating_away/ |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi 👋 It's difficult to reason about this without looking at your implementation. Please can you provide a minimal runnable sandbox so we can take a look for you? |
Beta Was this translation helpful? Give feedback.
-
That's the thing, if I create a minimal implementation, it will work. I have the very same configuration as the star wars example. I was looking for broad information about cases that can make the cache disappear so that I can investigate furthur |
Beta Was this translation helpful? Give feedback.
-
I found the problem. It is the same as #2765. I was creating the client inside the app |
Beta Was this translation helpful? Give feedback.
I found the problem. It is the same as #2765.
I was creating the client inside the app