You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This appears to be due to the fact that React delays invoking unmount effects until commit phase, whereas Preact invokes unmount effects synchronously.
Upon unmounting Select's children, this effect is cleaned up and the itemMap is cleared. When rendering/mounting the children again, itemMap is empty and so it thinks there are no items (which arguably there aren't since we just unmounted them). This appears to work in React cuz the unmount is delayed until after the render.
Sorry I don't have a workaround or fix at the moment, but just wanted to leave some notes here for posterity in case I or someone else picks this up again.
Describe the bug
I try to port Radix UI to preact & Fresh
See :
Every components work except Select which freeze the page (getItems has no element => error)
To Reproduce
The code with React
https://codesandbox.io/p/sandbox/select-radixui-react-klhjfn
The code with Preact : I have only change
React.forwardRef
toimport { forwardRef } from "preact/compat";
In Fresh, I made alias/external to react
The repo to test
https://github.com/hapaxlife/select-radixui-preact
Expected behavior
When you click on Select, the page freezes.
I suspect that error comes from Preact but not sure if Fresh is involve
The text was updated successfully, but these errors were encountered: