fix(react): Fix updating to 18.0 root dom error

This commit is contained in:
Wessel Tip 2024-02-08 13:16:30 +01:00
parent f71c19d081
commit 7179ee2a87
No known key found for this signature in database
GPG Key ID: AB6FC0C118D79214
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import { render } from 'react-dom';
import { createRoot } from 'react-dom/client';
import * as Sentry from '@sentry/react';
import App from './App';
@ -24,4 +24,6 @@ Sentry.init({
autoSessionTracking: false,
});
render(<App />, document.getElementById('root'));
const container = document.getElementById('root');
const root = createRoot(container);
root.render(<App />);