Skip to content

Commit f41c407

Browse files
committed
Updates chatper 11, 12
1 parent 06ef420 commit f41c407

File tree

6 files changed

+12212
-13853
lines changed

6 files changed

+12212
-13853
lines changed

11/todo-app/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"private": true,
55
"dependencies": {
66
"classnames": "^2.2.6",
7-
"react": "^17.0.2",
8-
"react-dom": "^17.0.2",
7+
"react": "^18.2.0",
8+
"react-dom": "^18.2.0",
99
"react-icons": "^3.7.0",
10-
"react-scripts": "^4.0.3",
10+
"react-scripts": "^5.0.1",
1111
"react-virtualized": "^9.21.1",
12-
"sass": "^1.37.5"
12+
"sass": "^1.62.0"
1313
},
1414
"scripts": {
1515
"start": "react-scripts start",

11/todo-app/src/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from 'react';
2-
import ReactDOM from 'react-dom';
2+
import ReactDOM from 'react-dom/client';
33
import './index.css';
44
import App from './App';
5-
import * as serviceWorker from './serviceWorker';
65

7-
ReactDOM.render(<App />, document.getElementById('root'));
6+
const root = ReactDOM.createRoot(document.getElementById('root'));
87

9-
// If you want your app to work offline and load faster, you can change
10-
// unregister() to register() below. Note this comes with some pitfalls.
11-
// Learn more about service workers: https://bit.ly/CRA-PWA
12-
serviceWorker.unregister();
8+
root.render(
9+
<React.StrictMode>
10+
<App />
11+
</React.StrictMode>
12+
);

0 commit comments

Comments
 (0)