それを行うための最良の方法を見つけました。私は最速の方法を意味します:w3school
https://www.w3schools.com/howto/howto_js_copy_clipboard.asp
反応機能コンポーネントの内部。handleCopyという名前の関数を作成します。
function handleCopy() {
  // get the input Element ID. Save the reference into copyText
  var copyText = document.getElementById("mail")
  // select() will select all data from this input field filled  
  copyText.select()
  copyText.setSelectionRange(0, 99999)
  // execCommand() works just fine except IE 8. as w3schools mention
  document.execCommand("copy")
  // alert the copied value from text input
  alert(`Email copied: ${copyText.value} `)
}
<>
              <input
                readOnly
                type="text"
                value="exemple@email.com"
                id="mail"
              />
              <button onClick={handleCopy}>Copy email</button>
</>
Reactを使用しない場合、w3schoolsにはツールチップを含めてこれを行う1つのクールな方法があります。https://www.w3schools.com/howto/tryit.asp?filename = tryhow_js_copy_clipboard2  
Reactを使用する場合は、Toastifyを使用してメッセージを通知することをお勧めします。
https://github.com/fkhadra/react-toastifyこれは非常に使いやすいライブラリです。インストール後、次の行を変更できる場合があります。
 alert(`Email copied: ${copyText.value} `)
次のような場合:
toast.success(`Email Copied: ${copyText.value} `)
使用したい場合は、toastifyのインストールを忘れないでください。ToastContainerをインポートし、cssをトーストします。
import { ToastContainer, toast } from "react-toastify"
import "react-toastify/dist/ReactToastify.css"
トーストコンテナをreturn内に追加します。 
import React from "react"
import { ToastContainer, toast } from "react-toastify"
import "react-toastify/dist/ReactToastify.css"
export default function Exemple() {
  function handleCopy() {
    var copyText = document.getElementById("mail")
    copyText.select()
    copyText.setSelectionRange(0, 99999)
    document.execCommand("copy")
    toast.success(`Hi! Now you can: ctrl+v: ${copyText.value} `)
  }
  return (
    <>
      <ToastContainer />
      <Container>
                <span>E-mail</span>
              <input
                readOnly
                type="text"
                value="myemail@exemple.com"
                id="mail"
              />
              <button onClick={handleCopy}>Copy Email</button>
      </Container>
    </>
  )
}