Comment copier du texte dans React

// copy text on button click  in react
    const [textArea, setTextArea] = useState("THis is text")
    
	const copyText = () => {
        navigator.clipboard.writeText(textArea);
    }
Abhishek