We generally use the below for ReactQuery's useMutation hook const [mutate, {isSuccess, isLoading}) = useMutation(yourMutation) Once submitting the form and displaying the success message, the isSucess flag is set to true though we reset the form to ...