Merge pull request #20596 from backstage/rugvip/react-18-compat

dev-utils,techdocs: add conditional support for React 18
This commit is contained in:
Patrik Oldsberg
2023-10-13 16:40:17 +02:00
committed by GitHub
13 changed files with 113 additions and 25 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
In frontend builds and tests `process.env.HAS_REACT_DOM_CLIENT` will now be defined if `react-dom/client` is present, i.e. if using React 18. This allows for conditional imports of `react-dom/client`.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/dev-utils': patch
'@backstage/plugin-techdocs': patch
---
Added support for React 18. The new `createRoot` API from `react-dom/client` will now be used if present.