spotty-amberS
Refine4y ago
6 replies
spotty-amber

How to invalidate query after useCreate mutation?

I am using useCreate hook on a list page for my custom requirement. I am able to mutate the data whenever user performs an create action but now how do I refresh or invalidates the list data. So, that user gets the up to date data?

I have looked on to https://refine.dev/docs/api-reference/core/hooks/data/useCreate/#properties invalidates property but still confused on how to invalidate the list data.
useCreate data hook from refine is a modified version of react-query's useMutation for create mutations
useCreate | refine
Was this page helpful?