Fix rendering for react 18

This commit is contained in:
CrispyBaguette 2022-04-18 09:01:44 +02:00
parent d0d60c8a56
commit 967880054f
3 changed files with 19 additions and 16 deletions

View File

@ -18,7 +18,6 @@
"@types/jest": "^26.0.24",
"@types/node": "^12.20.37",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"classnames": "^2.3.1",
"file-saver": "^2.0.5",
"react": "^18.0.0",
@ -30,6 +29,7 @@
"devDependencies": {
"@tailwindcss/forms": "^0.4.0",
"@types/file-saver": "^2.0.4",
"@types/react-dom": "^18.0.1",
"autoprefixer": "^10.4.0",
"postcss": "^8.4.4",
"tailwindcss": "^3.0.1"
@ -3351,9 +3351,10 @@
}
},
"node_modules/@types/react-dom": {
"version": "17.0.11",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.11.tgz",
"integrity": "sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q==",
"version": "18.0.1",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.1.tgz",
"integrity": "sha512-jCwTXvHtRLiyVvKm9aEdHXs8rflVOGd5Sl913JZrPshfXjn8NYsTNZOz70bCsA31IR0TOqwi3ad+X4tSCBoMTw==",
"dev": true,
"dependencies": {
"@types/react": "*"
}
@ -16933,9 +16934,10 @@
}
},
"@types/react-dom": {
"version": "17.0.11",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.11.tgz",
"integrity": "sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q==",
"version": "18.0.1",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.1.tgz",
"integrity": "sha512-jCwTXvHtRLiyVvKm9aEdHXs8rflVOGd5Sl913JZrPshfXjn8NYsTNZOz70bCsA31IR0TOqwi3ad+X4tSCBoMTw==",
"dev": true,
"requires": {
"@types/react": "*"
}

View File

@ -14,7 +14,6 @@
"@types/jest": "^26.0.24",
"@types/node": "^12.20.37",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"classnames": "^2.3.1",
"file-saver": "^2.0.5",
"react": "^18.0.0",
@ -50,6 +49,7 @@
"devDependencies": {
"@tailwindcss/forms": "^0.4.0",
"@types/file-saver": "^2.0.4",
"@types/react-dom": "^18.0.1",
"autoprefixer": "^10.4.0",
"postcss": "^8.4.4",
"tailwindcss": "^3.0.1"

View File

@ -1,14 +1,15 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import React from "react";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import { createRoot } from "react-dom/client";
ReactDOM.render(
const container = document.getElementById("root");
const root = createRoot(container!);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
</React.StrictMode>
);
// If you want to start measuring performance in your app, pass a function