equal-aqua
equal-aqua2y ago

useCreateMany

how to use onMutationSuccess in useCreateMany hook
2 Replies
wise-white
wise-white2y 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
},
},
);
equal-aqua
equal-aqua2y ago
👍