Skip to content

Document htmlIdGenerator use cases #639

@cjcenizal

Description

@cjcenizal

Some questions arose in #637 which we should answer with documentation. I think we need to add a page for htmlIdGenerator under the "Utilities" section of the docs site, which presents realistic examples of the use cases @timroes mentioned in #637 (comment):

  • One generator used to create a one-off ID, e.g. htmlIdGenerator()()
  • One generator using a prefix to create a series of IDs that are namespaced, e.g. a form component which will be instantiated in multiple places within the same UI
  • Two different generators using the same suffix, resulting in unique IDs
  • A generator using both a prefix and a suffix, though I'm not sure if there is a use case for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationIssues or PRs that only affect documentation - will not need changelog entries

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions