Skip to content

Commit

Permalink
client: switch ReactDOM.render to createRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
goffrie committed Feb 20, 2024
1 parent 5bb816f commit 7b70940
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import './index.css';
import App from './App';

const initialRoom = window.location.hash ? window.location.hash.substr(1) : '';

ReactDOM.render(<App initialRoom={initialRoom} />, document.getElementById('root'));
const container = document.getElementById('root')!;
const root = createRoot(container);
root.render(<App initialRoom={initialRoom} />);

0 comments on commit 7b70940

Please sign in to comment.