Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utils should be exported #4503

Open
keithamus opened this issue Apr 15, 2024 · 0 comments
Open

Utils should be exported #4503

keithamus opened this issue Apr 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request react

Comments

@keithamus
Copy link
Member

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request react
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants