Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2209564

Browse files
committedApr 4, 2025·
Move useId note about Server Components to caveats
1 parent 50b2fe8 commit 2209564

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
 

‎src/content/reference/react/useId.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
title: useId
33
---
44

5-
<RSC>
6-
7-
`useId` is allowed in non-async [Server Components](/reference/rsc/server-components).
8-
9-
</RSC>
10-
115
<Intro>
126

137
`useId` is a React Hook for generating unique IDs that can be passed to accessibility attributes.
@@ -52,6 +46,8 @@ function PasswordField() {
5246
5347
* `useId` **should not be used to generate keys** in a list. [Keys should be generated from your data.](/learn/rendering-lists#where-to-get-your-key)
5448
49+
* `useId` currently cannot be used in [async Server Components](/reference/rsc/server-components#async-components-with-server-components).
50+
5551
---
5652
5753
## Usage {/*usage*/}

0 commit comments

Comments
 (0)
Please sign in to comment.