From deaa0580d952b77cf9e6df024d1f71ed29f53fc0 Mon Sep 17 00:00:00 2001
From: Kristóf Marussy <kristof@marussy.com>
Date: Wed, 27 Jul 2022 16:34:14 +0200
Subject: chore: bump dependencies

---
 subprojects/frontend/src/index.tsx | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'subprojects/frontend/src/index.tsx')

diff --git a/subprojects/frontend/src/index.tsx b/subprojects/frontend/src/index.tsx
index 15b26adb..6cdbbd64 100644
--- a/subprojects/frontend/src/index.tsx
+++ b/subprojects/frontend/src/index.tsx
@@ -1,13 +1,16 @@
 import React from 'react';
-import { render } from 'react-dom';
+import { createRoot } from 'react-dom/client';
 import CssBaseline from '@mui/material/CssBaseline';
 
 import { App } from './App';
 import { RootStore, RootStoreProvider } from './RootStore';
 import { ThemeProvider } from './theme/ThemeProvider';
+import { getLogger } from './utils/logger';
 
 import './index.scss';
 
+const log = getLogger('index');
+
 const initialValue = `class Family {
     contains Person[] members
 }
@@ -66,4 +69,10 @@ const app = (
   </RootStoreProvider>
 );
 
-render(app, document.getElementById('app'));
+const rootElement = document.getElementById('app');
+if (rootElement === null) {
+  log.error('Root element not found');
+} else {
+  const root = createRoot(rootElement);
+  root.render(app);
+}
-- 
cgit v1.2.3-54-g00ecf

