vicious-gold
vicious-gold3y ago

useCreateMany

how to use onMutationSuccess in useCreateMany hook
2 Replies
rival-black
rival-black3y 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-goldOP3y ago
👍

Did you find this page helpful?