Combine styled RAC and default RAC. #6974
-
Hi everyone, I'm having trouble integrating styled react-aria-components in a regular application that uses RAC. To isolate the issue, I created two projects using
Example: import Button from "rac-button-test";
import { DialogTrigger, Popover } from "react-aria-components";
<DialogTrigger>
<Button>Open Popover</Button>
<Popover>
<h2>Popover</h2>
<p>Popover content</p>
</Popover>
</DialogTrigger> The problem is that the I found two(1st, 2nd) solved discussions that were solved by declaring My current workout is to reexport the Has anyone experienced a similar issue or can shed light on what might be causing this behavior? I would greatly appreciate any suggestions on how to fix the DialogTrigger functionality without needing to export it directly from the component library. Thanks in advance for your help and support! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Depends on what files are being referenced, it can behavior in a similar way to the bugs seen when there are multiple copies of a package.
Depending on your bundler and package manager, you may be resolving to a different one in your app vs in your Can you verify? one quick way is to just put a console log into the top level of each of those files so you know if they are imported |
Beta Was this translation helpful? Give feedback.
I found your issue. rac-button-test is using the
main.js
files, however, your app is using themjs
files. You'll need to get them aligned. Probably by either adding moreexports
in your package.json for rac-test-button and transpiling to more options. Or by changing your app so that it resolves to the some thing that rac-test-button does.