Skip to content

Utils should be exported #4503

Description

@keithamus

Problem statement

Right now many consumers use our utils functions. They do so because the utils are available, but not via a nice path.

For example this search (employees only) shows a few callsites of people importing ForwardRefComponent and useIsomorphicLayoutEffect.

Proposed solution

We expose utils as a proper path, with re-exports, so one can write, for example:

importtype{ForwardRefComponent}from'@primer/react/utils'

as opposed to the current:

importtype{ForwardRefComponent}from'@primer/react/lib-esm/utils/polymorphic'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions