T
TanStack15mo ago
foreign-sapphire

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
optimistic-gold
optimistic-gold15mo ago
you can use queryClient.invalidateQueries(['queryKey']) which will force a re-fetch
foreign-sapphire
foreign-sapphireOP15mo ago
Thank you.

Did you find this page helpful?