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
+27-2Lines changed: 27 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,30 @@ 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 material should work as it is 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 compatibly problems, <i>downgrade</i> to the older React by changing the file <i>pacgage.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
+
10
34
### Complex state
11
35
12
36
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?
@@ -1013,7 +1037,8 @@ You may find the following links useful:
1013
1037
</div>
1014
1038
1015
1039
<divclass="tasks">
1016
-
<h3>Exercises 1.6.-1.14.</h3>
1040
+
1041
+
<h3>Exercises 1.6.-1.14.</h3>
1017
1042
1018
1043
Submit your solutions to the exercises by first pushing your code to GitHub and then marking the completed exercises into the [exercise submission system](https://studies.cs.helsinki.fi/stats/courses/fullstackopen).
1019
1044
@@ -1029,7 +1054,7 @@ In some situations you may also have to run the command below from the root of t
1029
1054
rm -rf node_modules/ && npm i
1030
1055
```
1031
1056
1032
-
<h4> 1.6: unicafe step1</h4>
1057
+
<h4> 1.6: unicafe step1</h4>
1033
1058
1034
1059
Like most companies, [Unicafe](https://www.unicafe.fi/#/9/4) collects feedback from its customers. Your task is to implement a web application for collecting customer feedback. There are only three options for feedback: <i>good</i>, <i>neutral</i>, and <i>bad</i>.
0 commit comments