Invalidate query in react native
Using an infinite query in react native. One screen has
On another screen I allow the user to update their profile picture. After the image is uploaded I run
To invalidate all queries related to that user (i.e. posts, comments, etc that would all have the profile picture associated with them) . This however is not causing my list of posts to update when I return to the screen. Only after I refresh (which triggers a re-fetch manually) will it update the posts.
Why might this be?
On another screen I allow the user to update their profile picture. After the image is uploaded I run
To invalidate all queries related to that user (i.e. posts, comments, etc that would all have the profile picture associated with them) . This however is not causing my list of posts to update when I return to the screen. Only after I refresh (which triggers a re-fetch manually) will it update the posts.
Why might this be?