Repository navigation
chore(react-portal): support for React 19 - #33978
Merged
Oleksandr Fediashov (layershifter) merged 5 commits intoMay 14, 2025
Merged
Oleksandr Fediashov (layershifter) merged 5 commits into
Oleksandr Fediashov (layershifter) merged 5 commits into
Conversation
📊 Bundle size reportUnchanged fixtures
|
|
Pull request demo site: URL |
Oleksandr Fediashov (layershifter)
force-pushed
the
fix/portals-attemp-2
branch
from
March 12, 2025 14:01
c4f9589 to
2d6e338
Compare
🕵 fluentuiv9 No visual regressions between this PR and main |
🕵 FluentUIV0 No visual regressions between this PR and main |
🕵 fluentuiv8 No visual regressions between this PR and main |
Oleksandr Fediashov (layershifter)
force-pushed
the
fix/portals-attemp-2
branch
from
April 4, 2025 09:49
72a80d5 to
62aaeb6
Compare
Oleksandr Fediashov (layershifter)
force-pushed
the
fix/portals-attemp-2
branch
from
April 4, 2025 09:55
62aaeb6 to
4157996
Compare
Oleksandr Fediashov (layershifter)
force-pushed
the
fix/portals-attemp-2
branch
from
April 4, 2025 10:04
4157996 to
a17dbe5
Compare
Oleksandr Fediashov (layershifter)
marked this pull request as ready for review
April 4, 2025 11:56
Contributor
Author
ling1726
reviewed
Apr 28, 2025
ling1726
approved these changes
Apr 28, 2025
Oleksandr Fediashov (layershifter)
enabled auto-merge (squash)
May 14, 2025 09:51
1 task done
Dmytro Kirpa (dmytrokirpa)
pushed a commit
to dmytrokirpa/fluentui
that referenced
this pull request
May 27, 2025
Dmytro Kirpa (dmytrokirpa)
pushed a commit
that referenced
this pull request
May 27, 2025
Martin Hochel (Hotell)
pushed a commit
that referenced
this pull request
Jun 3, 2025
Dmytro Kirpa (dmytrokirpa)
pushed a commit
that referenced
this pull request
Jun 3, 2025
Victor Genaev (mainframev)
pushed a commit
to mainframev/fluentui
that referenced
this pull request
Jun 9, 2025
ling1726
added a commit
to ling1726/fluentui
that referenced
this pull request
Jun 23, 2025
Fixes a regression introduced in microsoft#33978 The portal element was updated to use a HTMLElement proxy. This means that the disposal function that tries to delete a 'hidden' property a HTMLElement does actually do anything. This PR updates the disposal to set an explicit value
This was referenced Jun 24, 2025
Oleksandr Fediashov (layershifter)
added a commit
that referenced
this pull request
Jun 27, 2025
This reverts commit 409dd35.
Tudor Popa (tudorpopams)
pushed a commit
to tudorpopams/fluentui
that referenced
this pull request
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #31429.
Previously
We used
use-disposablewhich is not compatible with React 19 (microsoft/use-disposable#31) and actually cannot be compatible due its implementation: microsoft/use-disposable#40 (comment)Changes
use-disposableis removedFactories split (React 17)
usePortalMountNode()was modified to have two modifications: legacy & modern.Legacy is used for React 17 & below and relies on the original approach with
React.useMemo(). This approach won't work with SM & CM, but it's fine as it should not 🐱Modern is used for React 18+ and based on current React behavior:
.createPortal()are performed onceThis allows to built and return a proxy to an actual DOM element: