docs: add note that useId must be used with single root element

This commit is contained in:
Daniel Roe 2024-03-17 19:17:25 +01:00
parent 5b29dd3f3c
commit 401370b3a0
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -24,6 +24,10 @@ const id = useId()
</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
`useId` does not take any parameters.