Why are previously public utilities now bundled as private? #10256
Pearce-Ropion
started this conversation in
General
Replies: 1 comment 1 reply
-
|
These were never publicly documented. Yes you can import them but that doesn't mean we recommend their use. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Why are previously public utilities now bundled as private? I know they can still be imported from the private path but I don't understand why they are marked as "private". Part of the idea of the headless API is that you can build custom behavior/hooks using the same internals as what the primary hook API offers. In order to do so, you pretty much have to use these private utils.
For example, previously I could
import { focusSafely } from '@react-aria/focus. Now I have to go fetch this utility from a "private" path:import { focusSafely } from 'react-aria/private/interactions/focusSafely'Instead, I propose that the now private utils should be just exported as standard utils using the existing
"exports": "./*"wildcard system. So in my above example, the import would instead beimport { focusSafely } from 'react-aria/interactions/focusSafely'Beta Was this translation helpful? Give feedback.
All reactions