diff --git a/website/src/main.js b/website/src/main.js index 7bf84335f8..bdaba69b3e 100644 --- a/website/src/main.js +++ b/website/src/main.js @@ -22,7 +22,7 @@ // import 'babel-register'; import React from 'react'; -import ReactDOM from 'react-dom'; +import ReactDOM from 'react-dom/client'; import {Provider} from 'react-redux'; import store from './reducers'; import Routes from './routes'; @@ -33,9 +33,9 @@ require('./static/favicon.png'); const el = document.createElement('div'); document.body.appendChild(el); -ReactDOM.render( +const root = ReactDOM.createRoot(el); +root.render( - , - el + ); diff --git a/website/webpack.config.js b/website/webpack.config.js index e0f89f6508..c45b165352 100644 --- a/website/webpack.config.js +++ b/website/webpack.config.js @@ -65,6 +65,7 @@ const COMMON_CONFIG = { // Imports the kepler.gl library from the src directory in this repo 'kepler.gl': libSources, react: resolve(rootDir, './node_modules/react'), + 'react-dom': resolve(rootDir, './node_modules/react-dom'), 'styled-components': resolve(rootDir, './node_modules/styled-components'), 'react-redux': resolve(rootDir, './node_modules/react-redux'), 'react-palm': resolve(rootDir, './node_modules/react-palm'),