@repo/utils-react provides shared React utility hooks. It currently exports useCopyToClipboard for copying text to the clipboard with success/error feedback.
flowchart LR
utilsReact["@repo/utils-react"]
ts["@repo/typescript-config"]
vitest["@repo/vitest-config"]
utilsReact -.-> ts
utilsReact -.-> vitestimport { useCopyToClipboard } from "@repo/utils-react/hooks";
function CopyButton({ text }: { text: string }) {
const { copy, copied } = useCopyToClipboard();
return (
<button onClick={() => copy(text)}>
{copied ? "Copied!" : "Copy"}
</button>
);
}
| Script | Description |
|---|---|
lint |
Run Biome check |
check-types |
Typecheck with tsc --noEmit |
test |
Run Vitest with coverage |
test:watch |
Run Vitest in watch mode |