Replies: 4 comments 11 replies
-
Sorry, but what's the error your are encountering? |
Beta Was this translation helpful? Give feedback.
-
@snowystinger Seems like this issue has come back, did you ever find the root cause of it? I'm currently investigating some of our projects that are throwing this error but I see someone else has also reported it recently |
Beta Was this translation helpful? Give feedback.
-
Just wanted to close the loop here in case anyone else encounters this issue in the future. We did some investigating and found that the issue was related to the animation some components have via OpenTransition where in a test environment like jest, the component was not done animating and createTreeWalker was called in an undefined state. We solved it by adding a timeout helper function like the one below that will wait for a few ms while the component is done updating function timeout(ms = 400): Promise<void> {
return act(async () => {
await new Promise((resolve) => setTimeout(resolve, ms));
});
} for example // inside a test environment
await userEvent action that will open a component like a popover
await userEvent action that will close said event
await timeout(); // allow the components to finish updating
// continue with the test |
Beta Was this translation helpful? Give feedback.
-
I'm also having this error when using error
Using
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I basically combined the select / button examples to create a new select component but encounter this error.
Examples reference:
https://react-spectrum.adobe.com/react-aria/useSelect.html
https://react-spectrum.adobe.com/react-aria/useButton.html
Code:
Select.tsx:
Options.tsx:
Option.tsx:
Button.tsx:
Beta Was this translation helpful? Give feedback.
All reactions