Skip to content

Commit

Permalink
Use ReactDOM.createRoot over old style
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Peveler <[email protected]>
  • Loading branch information
MasterOdin committed Apr 19, 2024
1 parent 307831a commit 22a36d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions example/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';

import './index.css';
import App from './App';

ReactDOM.render(<App />, document.getElementById('root'));
const root = createRoot(document.getElementById('root'));
root.render(<App />);

0 comments on commit 22a36d5

Please sign in to comment.