useCreateMany

how to use onMutationSuccess in useCreateMany hook
2 Replies
sensitive-blue
sensitive-blue3y 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
},
},
);
exotic-emerald
exotic-emeraldOP3y ago
👍

Did you find this page helpful?