Any component which uses Portal (such as Tooltip or Dialog) throws this error: "TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')", as you can see in the repro.
React 19 stable is meant to be released next week.
Logs
TypeError
Cannot read properties of undefined (reading 'ReactCurrentOwner')
getCurrentOwner
/node_modules/use-disposable/lib/index.js:28:86
useIsStrictMode
/node_modules/use-disposable/lib/index.js:42:24
useDisposable
/node_modules/use-disposable/lib/index.js:78:24
at usePortalMountNode (/node_modules/
fluentui/react-portal/lib-commonjs/components/Portal/usePortalMountNode.js:27:54
at usePortal_unstable (/node_modules/
fluentui/react-portal/lib-commonjs/components/Portal/usePortal.js:19:72
at Portal (/node_modules/
fluentui/react-portal/lib-commonjs/components/Portal/Portal.js:16:53
Requested priority
High
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] The provided reproduction is a minimal reproducible example of the bug.
Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
no
Reproduction
https://codesandbox.io/p/sandbox/fluentui-react-components-with-react-19-g4g5pw?file=%2Fsrc%2FApp.tsx
Bug Description
@fluentui/react-portal depends on use-disposable, which is incompatible with React 19: https://github.com/microsoft/use-disposable/issues/31 https://github.com/microsoft/fluentui/blob/babf7b45951d2e27f9724f3bbdd3dd77aee2c488/packages/react-components/react-portal/src/components/Portal/usePortalMountNode.ts#L38-L46
Any component which uses
Portal
(such asTooltip
orDialog
) throws this error: "TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')", as you can see in the repro.React 19 stable is meant to be released next week.
Logs
Requested priority
High
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations