File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,10 @@ return (
7878
7979``` javascript
8080import React , { useState } from " react" ;
81- import ReactDOM from " react-dom" ;
81+ import { createRoot } from " react-dom/client " ;
8282import FileUpload from " react-mui-fileuploader" ;
8383
84- function Wrapper () {
84+ function MuiFileUploader () {
8585 const [filesToUpload , setFilesToUpload ] = useState ([]);
8686
8787 const handleFilesChange = (files ) => {
@@ -112,10 +112,11 @@ function Wrapper() {
112112 );
113113}
114114
115- ReactDOM .render (< Wrapper / > , document .querySelector (" #root" ));
115+ const root = createRoot (document .getElementById (" root" ));
116+ root .render (< MuiFileUploader / > );
116117```
117118
118- [ ![ Edit thirsty-visvesvaraya-r9u6ho ] ( https://codesandbox.io/static/img/play-codesandbox.svg )] ( https://codesandbox.io/s/thirsty-visvesvaraya-r9u6ho?fontsize=14&hidenavigation=1&theme=dark )
119+ [ ![ Edit react-mui-fileuploader example ] ( https://codesandbox.io/static/img/play-codesandbox.svg )] ( https://codesandbox.io/s/thirsty-visvesvaraya-r9u6ho?fontsize=14&hidenavigation=1&theme=dark )
119120
120121## Data structure
121122
You can’t perform that action at this time.
0 commit comments