Import this in your client-side component
MyComponent.tsx
import { useCopyToClipboard } from "react-amazing-hooks";
Api | Description | Type | Return Type | Example |
---|---|---|---|---|
useCopyToClipboard | A hook to copy a string to the clipboard with an optional callback to handle success or failure. | useCopyToClipboard(callback?: (success: boolean) => void) | function | Note* |
Check the 'Example' tab above the table for an exhaustive example.*