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 · 1 comment
Open

Utils should be exported #4503

keithamus opened this issue Apr 15, 2024 · 1 comment
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'
@lesliecdubs
Copy link
Member

👋 Hi, I noticed the associated PR for this issue was closed in favor of #4513. Does that resolve this issue, or is there more work to be discussed here?

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.

3 participants