Skip to content

useId() return type #2997

Open
Open
@cernymatej

Description

@cernymatej

The return type of useId() in the docs is only string, however, the actual return type according to runtime-core.d.ts is string | undefined. Is this intentional or is it not correct in the docs?
I suppose that undefined is there in case the function is called outside a component, isn't it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentIssues / PRs related to docs content

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions