docs(examples): upgrade to React 18

Reference: https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html
This commit is contained in:
Damien Arrachequesne
2023-03-07 08:30:46 +01:00
parent 7952312911
commit b56da8a99f
3 changed files with 6304 additions and 8209 deletions

View File

@@ -3,14 +3,14 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1",
"socket.io": "4",
"socket.io-client": "4"
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "^5.0.1",
"socket.io": "^4.6.1",
"socket.io-client": "^4.6.1"
},
"scripts": {
"start": "react-scripts start",

View File

@@ -1,14 +1,15 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
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 your app to work offline and load faster, you can change

File diff suppressed because it is too large Load Diff