mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
docs: add note that useId
must be used with single root element
This commit is contained in:
parent
5b29dd3f3c
commit
401370b3a0
@ -24,6 +24,10 @@ const id = useId()
|
|||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
::note
|
||||||
|
`useId` must be used in a component with a single root element, as it uses this root element's attributes to pass the id from server to client.
|
||||||
|
::
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
`useId` does not take any parameters.
|
`useId` does not take any parameters.
|
||||||
|
Loading…
Reference in New Issue
Block a user