Skip to content

Conversation

@jdimovska
Copy link
Contributor

💡 Overview

This change removes the use of a randomly generated portal ID and instead uses a ref backed DOM element as the FloatingPortal root. Using Math.random() during render is not recommended and causes issues with some versions of React Compiler since the compiler may strip or reorder memoization.

…re-mounts

- pass root instead of id as floating-ui has better implementation for generating random ids in case useId is not available
@jdimovska jdimovska requested a review from oliverlaz January 5, 2026 10:45
@jdimovska jdimovska merged commit 9ea702f into main Jan 5, 2026
13 checks passed
@jdimovska jdimovska deleted the reqact-compiler-impure branch January 5, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants