react-aria modals causing layout thrashing? #8353
Replies: 2 comments 1 reply
-
I'm not aware of any issues with our modals. Do you have lots of rerenders going to them or can you reproduce in a codesandbox/stackblitz? that could help us isolate what's going on. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I can confirm that my analysis was wrong! Very sorry for the noise 😊 |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hello gents,
I was struggling trying to figure out why one of my app pages is so slow.
One of the things that devtools keep telling me is Forced reflow:
In the devtools, the identified culprits seem to be related to modals, between:
useViewportSize()
(called here): looking at its code, it readsvisualViewport.height
… which apparently causes a reflow.useModalOverlay()
>usePreventScroll()
which is also reading window dimensionsMy page is a list of around 30 cards, each with a button that can open a modal.
If I remove the button and the modal altogether, the page becomes speedy again! 🚀
My question is whether this is something that you have identified, looked at, have recommendations for?
Thanks in advance & best regards
Beta Was this translation helpful? Give feedback.
All reactions