bootstrap: Fix "ReactDOM.render is deprecated since React 18.0.0" lint error
After bumping to React 18 linter was outputting following error: "ReactDOM.render is deprecated since React 18.0.0, use createRoot instead, see https://reactjs.org/link/switch-to-createroot" This fixes the problem.
This commit is contained in:
parent
38e2852734
commit
8a31592ef8
1 changed files with 4 additions and 2 deletions
6
src/bootstrap.js
vendored
6
src/bootstrap.js
vendored
|
|
@ -1,7 +1,9 @@
|
|||
import React from 'react';
|
||||
|
||||
import ReactDOM from 'react-dom';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
|
||||
import ImageBuilder from './AppEntry';
|
||||
|
||||
ReactDOM.render(<ImageBuilder />, document.getElementById('root'));
|
||||
const root = createRoot(document.getElementById('root'));
|
||||
|
||||
root.render(<ImageBuilder />);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue