@@ -138,11 +138,16 @@ const getPayload = (code, sourceFiles = {}) =>
138138 '@data-driven-forms/react-form-renderer' : 'latest' ,
139139 '@mui/material' : 'latest' ,
140140 '@mui/icons-material' : 'latest' ,
141- react : '16.12.0' ,
142- 'react-dom' : '16.12.0' ,
143- 'react-scripts' : '3.0.1' ,
141+ react : '^18.2.0' ,
142+ 'react-dom' : '^18.2.0' ,
143+ 'react-scripts' : '5.0.1' ,
144+ } ,
145+ devDependencies : {
146+ '@types/react' : '18.2.38' ,
147+ '@types/react-dom' : '18.2.15' ,
148+ 'loader-utils' : '3.2.1' ,
149+ typescript : '4.4.4' ,
144150 } ,
145- devDependencies : { typescript : '3.8.3' } ,
146151 scripts : {
147152 start : 'react-scripts start' ,
148153 build : 'react-scripts build' ,
@@ -153,8 +158,19 @@ const getPayload = (code, sourceFiles = {}) =>
153158 } ,
154159 } ,
155160 'src/index.js' : {
156- content :
157- 'import React from "react";\nimport ReactDOM from "react-dom";\n\nimport App from "./App";\n\nconst rootElement = document.getElementById("root");\nReactDOM.render(\n <React.StrictMode>\n <App />\n </React.StrictMode>,\n rootElement\n);\n' ,
161+ content : `import { StrictMode } from "react";
162+ import { createRoot } from "react-dom/client";
163+
164+ import App from "./App";
165+
166+ const rootElement = document.getElementById("root");
167+ const root = createRoot(rootElement);
168+ root.render(
169+ <StrictMode>
170+ <App />
171+ </StrictMode>
172+ );
173+ ` ,
158174 } ,
159175 'src/App.js' : {
160176 content : code ,
0 commit comments