Skip to content

Commit f7f0393

Browse files
committed
Deprecate useUniqueId and recommend Preact's useId instead
1 parent 61b14f4 commit f7f0393

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/hooks/use-unique-id.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ let idCounter = 0;
66
* instance.
77
*
88
* This avoids different instances of a component re-using the same ID.
9+
*
10+
* @deprecated Use Preact's `useId()` instead.
911
*/
1012
export function useUniqueId(prefix: string) {
1113
const [id] = useState(() => {

0 commit comments

Comments
 (0)