You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/1/en/part1d.md
-44Lines changed: 0 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,50 +7,6 @@ lang: en
7
7
8
8
<divclass="content">
9
9
10
-
### A note on React version
11
-
12
-
Version 18 of React was released late March 2022. The code in this course should work with the new React version. However, some libraries might not yet be compatible with React 18. At the moment of writing (4th April) at least the Apollo client used in [part 8](/en/part8) does not yet work with most recent React.
13
-
14
-
In case you end up in a situation where your application breaks because of library compatibility problems, <i>downgrade</i> to the older React by changing the file <i>package.json</i> as follows:
15
-
16
-
```js
17
-
{
18
-
"dependencies": {
19
-
"react":"^17.0.2", // highlight-line
20
-
"react-dom":"^17.0.2", // highlight-line
21
-
"react-scripts":"5.0.0",
22
-
"web-vitals":"^2.1.4"
23
-
},
24
-
// ...
25
-
}
26
-
```
27
-
28
-
After the change is made, reinstall dependencies by running
29
-
30
-
```js
31
-
npm install
32
-
```
33
-
34
-
Note that also the file <i>index.js</i> needs to be changed a bit. For React 17 it looks like
In our previous example the application state was simple as it was comprised of a single integer. What if our application requires a more complex state?
0 commit comments