]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/index.js
update react
[alttp.git] / resources / js / index.js
index daa2bd5cf96091a5dbba0055d09c46e8b9c9dcd1..f4cda6137d0e355867373450e7d354fc88ed1d00 100644 (file)
@@ -7,7 +7,7 @@
 import './bootstrap';
 
 import React from 'react';
-import ReactDOM from 'react-dom';
+import { createRoot } from 'react-dom/client';
 
 import toastr from 'toastr';
 toastr.options.positionClass = 'toast-bottom-right';
@@ -21,5 +21,6 @@ toastr.options.positionClass = 'toast-bottom-right';
 import App from './app';
 
 if (document.getElementById('react-root')) {
-       ReactDOM.render(<App />, document.getElementById('react-root'));
+       const root = createRoot(document.getElementById('react-root'));
+       root.render(<App />);
 }