dev-utils,techdocs: add conditional support for React 18

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-10-13 15:31:05 +02:00
parent f347782b9d
commit 9468a67b92
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.