Skip to content

Commit 7599b17

Browse files
committed
Add instructions about ensuring the correct React version (19)
1 parent c6be048 commit 7599b17

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

src/content/5/en/part5.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ In this part we return to the frontend, first looking at different possibilities
1010

1111
<i>Section updated 21st August 2025</i>
1212

13+
- <i>Node updated to version v22.3.0</i>
1314
- <i>React version updated from v18 to v19. PropTypes and forwardRef has deprecated</i>
1415
- <i>A label element has been added to the login form fields and used later in tests to identify the fields</i>
1516
- <i>.eslintrc.cjs replaced with eslint.config.js file</i>

src/content/5/en/part5b.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ lang: en
77

88
<div class="content">
99

10+
This section has been written using React 19, and some of the React features introduced in this chapter do not work with older versions of React. The earlier parts of the course were written using React version 18, so make sure that your project now has React version 19 installed.
11+
12+
You can check the <i>package.json</i> file to verify that version 19 of the <i>react</i> and <i>react-dom</i> libraries are in use:
13+
14+
```json
15+
{
16+
// ...
17+
"dependencies": {
18+
"axios": "^1.9.0",
19+
"react": "^19.1.0", // highlight-line
20+
"react-dom": "^19.1.0" // highlight-line
21+
},
22+
// ...
23+
}
24+
```
25+
26+
Also run the command _npm install_, which installs the dependencies according to the <i>package.json</i> file. This is necessary if, for example, you cloned the example repository at an earlier stage of the course, when an older version of React was still in use.
27+
1028
### Displaying the login form only when appropriate
1129

1230
Let's modify the application so that the login form is not displayed by default:

src/content/5/fi/osa5.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Tässä osassa palataan frontendin pariin, ensin tarkastellaan erilaisia tarjoll
1010

1111
<i>Osa päivitetty 21.8.2025</i>
1212

13+
- <i>Node päivitetty versioon v22.3.0</i>
1314
- <i>React-versio päivitetty v18 -> v19. Proptypes ja forwardRef poistuneet käytöstä</i>
1415
- <i>Kirjautumislomakkeen kentille on lisätty label-elementti ja käytetty sitä myöhemmin testeissä kenttien identifiointiin</i>
1516
- <i>.eslintrc.cjs korvattu eslint.config.js-tiedostolla</i>

src/content/5/fi/osa5b.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ lang: fi
77

88
<div class="content">
99

10+
Tämä osa on tehty käyttäen React 19 -versiota, ja jotkin tämän luvun esittelemistä Reactin ominaisuuksista eivät toimi Reactin vanhemmilla versioilla. Kurssin aiemmat osat on kirjoitettu käyttäen Reactin versiota 18, joten varmista, että projektiisi on nyt asennettuna Reactin versio 19.
11+
12+
Voit tarkistaa <i>package.json</i>-tiedostosta, että käytössä on versio 19 kirjastoista <i>react</i> ja <i>react-dom</i>:
13+
14+
```json
15+
{
16+
// ...
17+
"dependencies": {
18+
"axios": "^1.9.0",
19+
"react": "^19.1.0", // highlight-line
20+
"react-dom": "^19.1.0" // highlight-line
21+
},
22+
// ...
23+
}
24+
```
25+
26+
Suorita lisäksi komento _npm install_, jolloin <i>package.json</i>-tiedoston mukaiset versiot asennetaan riippuvuuksiksi. Tämä on välttämätöntä esimerkiksi, jos olet kloonannut esimerkkirepositorion kurssin aiemmassa vaiheessa, jolloin käytössä on ollut vielä Reactin vanhempi versio.
27+
1028
### Kirjautumislomakkeen näyttäminen vain tarvittaessa
1129

1230
Muutetaan sovellusta siten, että kirjautumislomaketta ei oletusarvoisesti näytetä:

0 commit comments

Comments
 (0)