diff --git a/packages/documentation-framework/README.md b/packages/documentation-framework/README.md
index 1898a80fb3..bd36d05b34 100644
--- a/packages/documentation-framework/README.md
+++ b/packages/documentation-framework/README.md
@@ -28,10 +28,10 @@ We publish this theme [on npm.](https://www.npmjs.com/package/@patternfly/docume
This should not be needed, but if you encounter errors installing the above devDependencies, try adding one or more of these resolutions to your package.json file:
```
"resolutions": {
- "@types/react": "^16.8.0",
- "@types/react-dom": "^16.8.0",
- "react": "16.8.0",
- "react-dom": "16.8.0",
+ "@types/react": "^18",
+ "@types/react-dom": "^18",
+ "react": "^18",
+ "react-dom": "^18",
"chromedriver": "102.0.0",
"node-sass": "7.0.1",
"puppeteer": "14.3.0",
diff --git a/packages/documentation-framework/app.js b/packages/documentation-framework/app.js
index 58bb924916..a5577ce802 100644
--- a/packages/documentation-framework/app.js
+++ b/packages/documentation-framework/app.js
@@ -1,5 +1,5 @@
import React from 'react';
-import ReactDOM from 'react-dom';
+import { createRoot, hydrateRoot } from 'react-dom/client';
import { Router, useLocation } from '@reach/router';
import 'client-styles'; // Webpack replaces this import: patternfly-docs.css.js
import { SideNavLayout } from '@patternfly/documentation-framework/layouts';
@@ -107,8 +107,15 @@ const isPrerender = process.env.PRERENDER;
// Don't use ReactDOM in SSR
if (!isPrerender) {
function render() {
- const renderFn = isProd ? ReactDOM.hydrate : ReactDOM.render;
- renderFn(, document.getElementById('root'));
+ const container = document.getElementById('root');
+ // TODO: Enable StrictMode: https://reactjs.org/docs/strict-mode.html
+ const app = ;
+
+ if (isProd) {
+ hydrateRoot(container, app);
+ } else {
+ createRoot(container).render(app);
+ }
}
// On first load, await promise for the current page to avoid flashing a "Loading..." state
const Component = getAsyncComponent(null);
diff --git a/packages/documentation-framework/helpers/codesandbox.js b/packages/documentation-framework/helpers/codesandbox.js
index 42f149bc37..853b90ab4e 100644
--- a/packages/documentation-framework/helpers/codesandbox.js
+++ b/packages/documentation-framework/helpers/codesandbox.js
@@ -179,14 +179,16 @@ function getReactParams(title, code, scope, lang, relativeImports) {