T
TanStack12mo ago
ambitious-aqua

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
ambitious-aqua12mo ago
you can use queryClient.invalidateQueries(['queryKey']) which will force a re-fetch
ambitious-aqua
ambitious-aquaOP12mo ago
Thank you.

Did you find this page helpful?