T
TanStack•2y ago
multiple-amethyst

unresponsive invalidateQuery()

So all my other invalidateQueries() functions run on the rest of my app except this one, so I hacked it a bit to get it to work by setting the "enabled" property. The query runs when I change tabs at the top but not after an image is uploaded "onSettled" to make the new image available in the "Select Images" modal. So I'm basically running it with a "onClick" when I open the "Select Images" modal. If anyone has any ideas let me know 🙂 Could it be that the modal on "Select Images" could be too far from the root in the hierarchy tree?
No description
No description
No description
1 Reply
multiple-amethyst
multiple-amethystOP•2y ago
solved my issue, was creating a new QueryClient instead of useQueryClient

Did you find this page helpful?