Hooks
useUUID

Import this in your client-side component

MyComponent.tsx
import { useUUID, generateUUID } from "react-amazing-hooks";

API

ApiDescriptionTypeReturn TypeExample
generateUUIDFunction to generate a unique identifier.options?: GenerateUUIDOptionsstringgenerateUUID({ prefix: 'id-', length: 16 })
useUUIDCustom hook used to generate a unique identifier.options?: GenerateUUIDOptionsstringconst id = useUUID({ length: 32 });

Check the GenerateUUIDOptions in the 'Types' tab.