diff --git a/.core/app/index.js b/.core/app/index.js index df2b4621..d5f42b43 100644 --- a/.core/app/index.js +++ b/.core/app/index.js @@ -4,11 +4,10 @@ * ----------------------------------------------------------------------------- */ import React from 'react'; -import ReactDOM from 'react-dom'; import _ from 'underscore'; -import op from 'object-path'; import deps from 'dependencies'; import 'externals'; +import { createRoot, hydrateRoot } from 'react-dom/client'; /** * ----------------------------------------------------------------------------- @@ -154,12 +153,11 @@ export const App = async () => { // Render the React Components if (bindPoints.length > 0) { - bindPoints.forEach(item => { - ReactDOM.render( + bindPoints.forEach(item => + createRoot(item.element).render( {item.component}, - item.element, - ); - }); + ), + ); } // ensure router DOM Element is on the page @@ -179,14 +177,24 @@ export const App = async () => { ); console.log(...message); - ReactDOM[ssr ? 'hydrate' : 'render']( - - - - - , - appElement, - ); + if (ssr) { + hydrateRoot( + appElement, + + + + + , + ); + } else { + createRoot(appElement).render( + + + + + , + ); + } /** * @api {Hook} app-ready app-ready diff --git a/.core/reactium-config.js b/.core/reactium-config.js index b3c551ec..02f91165 100644 --- a/.core/reactium-config.js +++ b/.core/reactium-config.js @@ -4,7 +4,7 @@ const globby = require('./globby-patch'); const rootPath = path.resolve(__dirname, '..'); const gulpConfig = require('./gulp.config'); -const version = '4.1.12'; +const version = '4.1.13'; const defaultLibraryExternals = { axios: {