From 9c74d18abfdaf990b96cc25b762ab1c7c7c7f9cd Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Tue, 15 Nov 2022 09:09:43 +0000 Subject: [PATCH] Chore: Complete upgrade to React 18 --- packages/app-desktop/gui/Root.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/app-desktop/gui/Root.tsx b/packages/app-desktop/gui/Root.tsx index c2dfe671c..068c968bc 100644 --- a/packages/app-desktop/gui/Root.tsx +++ b/packages/app-desktop/gui/Root.tsx @@ -11,7 +11,7 @@ import { Size } from './ResizableLayout/utils/types'; import MenuBar from './MenuBar'; import { _ } from '@joplin/lib/locale'; const React = require('react'); -const { render } = require('react-dom'); +const { createRoot } = require('react-dom/client'); const { connect, Provider } = require('react-redux'); import Setting from '@joplin/lib/models/Setting'; import shim from '@joplin/lib/shim'; @@ -259,11 +259,11 @@ const Root = connect(mapStateToProps)(RootComponent); const store = app().store(); -render( +const root = createRoot(document.getElementById('react-root')); +root.render( - , - document.getElementById('react-root') + );