Refresh Data After Button Click
Hi, everyone. I just wanted to ask a quick question, after I click a link (such as delete) in the table, I want an api to be called and the data to be refreshed with new data. Is there a way to do this? Will using memoization affect this?
Thanks,
Adam
2 Replies
ambitious-aqua•12mo ago
you can use
queryClient.invalidateQueries(['queryKey'])
which will force a re-fetchambitious-aquaOP•12mo ago
Thank you.