Skip to content

Commit d9d0a8c

Browse files
authored
Merge branch 'source' into source
2 parents 665b817 + 61e22d4 commit d9d0a8c

38 files changed

+615
-576
lines changed

src/content/0/en/part0a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ Despite changes <i>all the submitted exercises remain valid</i>, and the course
340340
341341
Recent major changes
342342
343-
- Parts 1-3 (11-14th August): Create React app replaced with Vite
343+
- Parts 1-5 (11-17th August): Create React app replaced with Vite
344344
345345
### Expanding on a previously completed course
346346

src/content/0/fi/osa0a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ Kurssilla ei ole enää vuosittaisia versiota. Kurssi on siis käynnissä koko a
282282
Muutoksista huolimatta <i>kaikki jo tehdyt palautukset säilyvät voimassa</i>, eli voit jatkaa kurssia päivityksistä huolimatta normaaliin tapaan.
283283

284284
Viimeaikaisia isompia muutoksia
285-
- Osat 1-3 (11-14.8.2023): Create React app korvattu Vitellä
285+
- Osat 1-5 (11-14.8.2023): Create React app korvattu Vitellä
286286

287287
### Aiemmin suoritetun kurssin täydentäminen
288288

src/content/1/en/part1a.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,19 @@ The files <i>App.css</i> and <i>index.css</i>, and the directory <i>assets</i> m
6666

6767
Instead of Vite you can also use the older generation tool [create-react-app](https://github.com/facebookincubator/create-react-app) in the course to set up the applications. The most visible difference to Vite is the name of the application startup file, which is <i>index.js</i>.
6868

69-
The way to start the application is also different, it is started with a command
69+
The way to start the application is also different in CRA, it is started with a command
7070

7171
```
7272
npm start
7373
```
7474

75+
in contrast to Vite's
76+
77+
```
78+
npm run dev
79+
```
80+
81+
7582
The course is currently (11 August 2023) being updated to use Vite. Some brands may still use the application base created with create-react-app.
7683

7784
### Component
@@ -252,7 +259,9 @@ but when writing JSX, the tag needs to be closed:
252259

253260
### Multiple components
254261

255-
Let's modify the file <i>App.jsx</i> as follows (NB: export at the bottom is left out in these <i>examples</i>, now and in the future. It is still needed for the code to work):
262+
Let's modify the file <i>App.jsx</i> as follows:
263+
264+
256265

257266
```js
258267
// highlight-start
@@ -292,6 +301,9 @@ const App = () => {
292301
}
293302
```
294303

304+
**NB**: <em>export</em> at the bottom is left out in these <i>examples</i>, now and in the future. It is still needed for the code to work
305+
306+
295307
Writing components with React is easy, and by combining components, even a more complex application can be kept fairly maintainable. Indeed, a core philosophy of React is composing applications from many specialized reusable components.
296308

297309
Another strong convention is the idea of a <i>root component</i> called <i>App</i> at the top of the component tree of the application. Nevertheless, as we will learn in [part 6](/en/part6), there are situations where the component <i>App</i> is not exactly the root, but is wrapped within an appropriate utility component.
@@ -412,7 +424,7 @@ React has been configured to generate quite clear error messages. Despite this,
412424

413425
As we already mentioned, when programming with React, it is possible and worthwhile to write <em>console.log()</em> commands (which print to the console) within your code.
414426

415-
Also, keep in mind that **React component names must be capitalized**. If you try defining a component as follows:
427+
Also, keep in mind that **First letter of React component names must be capitalized**. If you try defining a component as follows:
416428

417429
```js
418430
const footer = () => {

src/content/11/en/part11c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ Before moving to next exercise, fix your deployment and ensure that the applicat
252252

253253
#### 11.12. Custom health check
254254

255-
**NOTE:** at the moment the the custom health check feature in Fly.io does not work. You can mark this exercise done without doing anything. A replacement for this exercise will be developed later...
255+
**NOTE:** at the moment the custom health check feature in Fly.io does not work. You can mark this exercise done without doing anything. A replacement for this exercise will be developed later...
256256

257257
Besides TCP and HTTP based health checks, Fly.io allows to use very flexible shell script based health checks. The feature is still undocumented but e.g. [this](https://community.fly.io/t/verifying-services-script-checks-is-supported/1464) shows you how to use it.
258258

src/content/13/en/part13a.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,9 @@ In the tasks of this section, we will build a blog application backend similar t
600600

601601
#### Task 13.1.
602602

603-
Create a GitHub repository for the application and create a new Heroku or Fly.io application for it, as well as a Postgres database. Make sure you are able to establish a connection to the application database.
603+
Create a GitHub repository for the application and create a new Fly.io or Heroku application for it, as well as a Postgres database. As mentioned [here](/en/part13/using_relational_databases_with_sequelize#application-database) you might set up your database also somewhere else, and in that case the Fly.io of Heroku app is not needed.
604+
605+
Make sure you are able to establish a connection to the application database.
604606

605607
#### Task 13.2.
606608

src/content/13/fi/osa13a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ Teemme tämän osan tehtävissä [osan 4](/osa4) tehtävien kanssa samanlaisen b
572572
573573
#### Tehtävä 13.1.
574574
575-
Tee sovellukselle GitHub-repositorio ja luo sen sisällä sovellusta varten Heroku-sovellus sekä Postgres-tietokanta. Varmista, että saat luotua yhteyden sovelluksen tietokantaan.
575+
Tee sovellukselle GitHub-repositorio ja luo sen sisällä sovellusta varten Fly.io tai Heroku-sovellus sekä Postgres-tietokanta. Varmista, että saat luotua yhteyden sovelluksen tietokantaan. Kuten [täällä](/osa13/relaatiotietokannan_kaytto_sequelize_kirjastolla#sovelluksen-tietokanta) mainittiin, voit hoitaa tietokannan myös esim. Dockerin avulla, tällöin et tarvitse Fly.io- tai Heroku-sovellusta.
576576
577577
#### Tehtävä 13.2.
578578

src/content/2/en/part2c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ Now we can see more clearly that the function [useEffect](https://react.dev/refe
473473
474474
So by default, the effect is <i>always</i> run after the component has been rendered. In our case, however, we only want to execute the effect along with the first render.
475475

476-
The second parameter of <em>useEffect</em> is used to [specify how often the effect is run](https://reactjs.org/docs/hooks-reference.html#conditionally-firing-an-effect). If the second parameter is an empty array <em>[]</em>, then the effect is only run along with the first render of the component.
476+
The second parameter of <em>useEffect</em> is used to [specify how often the effect is run]https://react.dev/reference/react/useEffect#parameters). If the second parameter is an empty array <em>[]</em>, then the effect is only run along with the first render of the component.
477477

478478
There are many possible use cases for an effect hook other than fetching data from the server. However, this use is sufficient for us, for now.
479479

src/content/2/fi/osa2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ lang: fi
99
Jatkamme Reactiin tutustumista. Ensin käsitellään datakokoelmien, esimerkiksi useamman taulukkoon sijoitetun nimen renderöimistä ruudulle. Tämän jälkeen tarkastellaan miten käyttäjä voi antaa tietoja React-sovellukselle HTML:n lomakkeiden avulla. Sen jälkeen fokus siirtyy siihen, miten selaimessa oleva JavaScript-koodi käsittelee palvelimelle talletettua dataa. Osan lopussa tarkastelemme nopeasti paria yksinkertaista tapaa CSS-tyylien lisäämiseksi React-sovellukseen.
1010

1111
<i>Osa päivitetty 14.8.2023</i>
12-
- <i>Create React App rokorvattu Vitellä</i>
12+
- <i>Create React App korvattu Vitellä</i>
1313

1414
</div>

src/content/2/fi/osa2c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ Nyt huomaamme selvemmin, että funktiolle [useEffect]((https://react.dev/referen
471471
472472
Eli oletusarvoisesti efekti suoritetaan <i>aina</i> sen jälkeen, kun komponentti renderöidään. Meidän tapauksessamme haluamme suorittaa efektin vain ensimmäisen renderöinnin yhteydessä.
473473

474-
Funktion <em>useEffect</em> toista parametria käytetään [tarkentamaan sitä, miten usein efekti suoritetaan](https://reactjs.org/docs/hooks-reference.html#conditionally-firing-an-effect). Jos toisena parametrina on tyhjä taulukko <em>[]</em>, suoritetaan efekti ainoastaan komponentin ensimmäisen renderöinnin jälkeen.
474+
Funktion <em>useEffect</em> toista parametria käytetään [tarkentamaan sitä, miten usein efekti suoritetaan](https://react.dev/reference/react/useEffect#parameters). Jos toisena parametrina on tyhjä taulukko <em>[]</em>, suoritetaan efekti ainoastaan komponentin ensimmäisen renderöinnin jälkeen.
475475

476476
Effect hookien avulla on mahdollisuus tehdä paljon muutakin kuin hakea dataa palvelimelta, mutta tämä riittää meille tässä vaiheessa.
477477

src/content/5/en/part5.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ lang: en
88

99
In this part we return to the frontend, first looking at different possibilities for testing the React code. We will also implement token based authentication which will enable users to log in to our application.
1010

11-
<i>Part updated 25th Jan 2023</i>
12-
- <i>No major changes</i>
11+
<i>Part updated 17th August 2023</i>
12+
- <i>Create React App replaced with Vite</i>
1313

1414
</div>

0 commit comments

Comments
 (0)