You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I already have redux toolkit in my app and I want to integrate RTK query. I have a Home page with list of post, and I have many users each with his own list of Posts, and I want cache these data each time I go back and forth between screens. Also, each List have infinite scrolling because it's a react-native app where I can do normal pagination with pages
But this is not caching the data properly, each time I go back and forth between the users The data is fetched again from the server. How could I resolve this issue ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I already have redux toolkit in my app and I want to integrate RTK query. I have a Home page with list of post, and I have many users each with his own list of Posts, and I want cache these data each time I go back and forth between screens. Also, each List have infinite scrolling because it's a react-native app where I can do normal pagination with pages
Here is my implementation:
and here is my function call
But this is not caching the data properly, each time I go back and forth between the users The data is fetched again from the server. How could I resolve this issue ?
Beta Was this translation helpful? Give feedback.
All reactions