Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gethinwebster committed Jul 27, 2023
1 parent d7c5fd4 commit 9d459a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/internal/hooks/use-unique-id/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ const useIdFallback = () => {
const useId: typeof useIdFallback = (React as any).useId ?? useIdFallback;

export function useUniqueId(prefix?: string) {
// if no prefix provided, add a letter at the beginning to ensure valid HTML id
return `${prefix ? prefix : 'i'}` + useId();
}

0 comments on commit 9d459a5

Please sign in to comment.