vicious-gold
vicious-gold2y ago

useCreateMany

how to use onMutationSuccess in useCreateMany hook
2 Replies
harsh-harlequin
harsh-harlequin2y ago
Hey @rehan1, You can use like this:
const { mutate } = useCreateMany();

mutate(
{ resource: "YOUR-RESOURCE", values: [] },
{
onSuccess: () => {
// your logic in here
},
},
);
const { mutate } = useCreateMany();

mutate(
{ resource: "YOUR-RESOURCE", values: [] },
{
onSuccess: () => {
// your logic in here
},
},
);
vicious-gold
vicious-gold2y ago
👍