Skip to content

Utils should be exported #4503

@keithamus

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:

import type {ForwardRefComponent} from '@primer/react/utils'

as opposed to the current:

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions