Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/utilities/src/utils/useId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ let idCounter = 0;
*
* @returns A generated ID that can be passed to accessibility attributes
*/
export const useId = (id?: any) => useReachId(id) || `id:${idCounter++}`;
export const useId = (id?: any) => `${useReachId(id)}` || `id:${idCounter++}`;
Copy link
Contributor Author

@ze-flo ze-flo Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the TypeScript returnType hasn’t changed and is still a 'string', the actual type of the returned value has and could, in rare situations, cause runtime errors.

Should that be a breaking-change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so – this feels like a fix.