Skip to content

Commit f73904d

Browse files
authored
Update part2e.md
translated a finnish part in embedded code sample and the initial value of currency was null ``` const App = () => { const [value, setValue] = useState('') const [rates, setRates] = useState({}) const [currency, setCurrency] = useState(null) ```
1 parent a17ceab commit f73904d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/2/en/part2e.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,11 +550,11 @@ The effect has the following condition
550550
551551
```js
552552
if (currency) {
553-
// haetaan valuuttakurssit
553+
// exchange rates are fetched
554554
}
555555
```
556556
557-
which prevents requesting the exchange rates just after the first render when the variable _currency_ still has the initial value, i.e. an empty string.
557+
which prevents requesting the exchange rates just after the first render when the variable _currency_ still has the initial value, i.e. a null value.
558558
559559
So if the user writes e.g. <i>eur</i> in the search field, the application uses Axios to perform an HTTP GET request to the address https://open.er-api.com/v6/latest/eur and stores the response in the _rates_ state.
560560

0 commit comments

Comments
 (0)