Skip to content
Open
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
6 changes: 6 additions & 0 deletions src/content/reference/react/useId.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@

* `useId` はフックであるため、**コンポーネントのトップレベル**または独自のフック内でのみ呼び出すことができます。ループまたは条件分岐内で呼び出すことはできません。もし必要な場合は、新しいコンポーネントを作成し、状態を移動させる必要があります。

<<<<<<< HEAD

Check failure on line 47 in src/content/reference/react/useId.md

View workflow job for this annotation

GitHub Actions / Lint on node 20.x and ubuntu-latest

コンフリクトマーカーが残っています。コンフリクトを解消してください。
* `useId` を、**リスト内の key の生成には使用しないでください**。[key はデータから生成される必要があります。](/learn/rendering-lists#where-to-get-your-key)
=======
* `useId` **should not be used to generate cache keys** for [use()](/reference/react/use). The ID is stable when a component is mounted but may change during rendering. Cache keys should be generated from your data.

* `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)
>>>>>>> a1ddcf51a08cc161182b90a24b409ba11289f73e

* `useId` currently cannot be used in [async Server Components](/reference/rsc/server-components#async-components-with-server-components).

Expand Down
Loading