Skip to content
Discussion options

You must be logged in to vote

so do you need to call that endpoint multiple times, once for each recipient? If so, I think you'd want the mutation to accept one recipient, and then just call that multiple times:

const { mutateAsync }
        = useMutation(['send-to-recipient'], ({recipient_name, values }) => axios.post(`/users/${recipient_name}`, values)

you can then call mutateAsync multiple times, e.g. in a Promise.all

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Xi-gofore
Comment options

@TkDodo
Comment options

Answer selected by Xi-gofore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants