Skip to content

Commit 4a0edd8

Browse files
committed
Specify the file name where changes should be made in part6a
1 parent 604c217 commit 4a0edd8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/content/6/en/part6a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ If there is data involved with the action, other fields can be declared as neede
5656

5757
The impact of the action to the state of the application is defined using a [reducer](https://redux.js.org/tutorials/essentials/part-1-overview-concepts#reducers). In practice, a reducer is a function that is given the current state and an action as parameters. It <i>returns</i> a new state.
5858

59-
Let's now define a reducer for our application at App.jsx:
59+
Let's now define a reducer for our application at <i>main.jsx</i>. The file initially looks like this:
6060

6161
```js
6262
const counterReducer = (state, action) => {

src/content/6/fi/osa6a.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Tutustutaan Reduxiin tekemällä jälleen kerran laskurin toteuttava sovellus:
3131

3232
![Renderöity kokonaisluku sekä kolme nappia: plus, minus ja zero](../../images/6/1.png)
3333

34-
Tehdään uusi Create React App ‑sovellus ja asennetaan siihen <i>Redux</i>:
34+
Tehdään uusi Vite‑sovellus ja asennetaan siihen <i>Redux</i>:
3535

3636
```bash
3737
npm install redux
@@ -53,7 +53,7 @@ Jos actioneihin liittyy dataa, määritellään niille tarpeen vaatiessa muitaki
5353

5454
Actionien vaikutus sovelluksen tilaan määritellään [reducerin](https://redux.js.org/basics/reducers) avulla. Käytännössä reducer on funktio, joka saa parametrikseen staten nykyisen tilan sekä actionin ja <i>palauttaa</i> staten uuden tilan.
5555

56-
Määritellään nyt sovelluksellemme reducer:
56+
Määritellään nyt sovelluksellemme reducer tiedostoon <i>main.jsx</i>. Tiedosto näyttää aluksi seuraavalta:
5757

5858
```js
5959
const counterReducer = (state, action) => {
@@ -84,7 +84,7 @@ const counterReducer = (state = 0, action) => {
8484
case 'ZERO':
8585
return 0
8686
default: // jos ei mikään ylläolevista tullaan tänne
87-
return state
87+
return state
8888
}
8989
}
9090
```

0 commit comments

Comments
 (0)