Replies: 1 comment 2 replies
-
|
is one of them importing somehow the cjs vs module vs main file instead? that can be another way to have "duplicates". |
Beta Was this translation helpful? Give feedback.
2 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
👋! I'm trying to access
Modal's context usinguseContext(ModalContext), but the hook always returnsnull. I'm callinguseContextfrom a child component rendered byModal, and I can see the Modal context provider wrapping the child if I inspect with the React developer tools. I've also confirmed that there are not multiple versions ofreact-aria-componentsinstalled in my service. Is this is a bug, or is there a different way I should access the context?I'd like access to the context in order to conditionally render a close button if
isDismissableis true onModal. Without access to the context, that requires passingisDismissableto both of my reusableModalandDialogcomponents. I'd prefer to expose the prop in just one component for a cleaner API.Here's a quick snippet and a code sandbox.
Beta Was this translation helpful? Give feedback.
All reactions