Hooks
useCopyToClipboard

Import this in your client-side component

MyComponent.tsx
import { useCopyToClipboard } from "react-amazing-hooks";
ApiDescriptionTypeReturn TypeExample
useCopyToClipboardA hook to copy a string to the clipboard with an optional callback to handle success or failure.useCopyToClipboard(callback?: (success: boolean) => void)functionNote*

Check the 'Example' tab above the table for an exhaustive example.*