Component APIs

createUniqueId

Edit this page
function createUniqueId(): string

A universal id generator that is stable across server/browser.

const id = createUniqueId()

Note: on the server this only works under hydratable components.

Report an issue with this page