Updating index.tsx to reflect changes between React 17 and 18.

This commit is contained in:
Eric van der Vlist 2022-09-01 18:47:36 +02:00
parent f20e082697
commit 1f53fbd3be
1 changed files with 5 additions and 7 deletions

View File

@ -1,11 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
import { createRoot } from 'react-dom/client';
const container = document.getElementById('root');
const root = createRoot(container!);
root.render(<App />);