Skip to content

Commit 4dabc35

Browse files
authored
Merge branch 'source' into patch-1
2 parents 9ff6961 + 6f05ccd commit 4dabc35

File tree

23 files changed

+295
-221
lines changed

23 files changed

+295
-221
lines changed

src/components/InfoBanner.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const InfoBanner = ({ visible, onHide }) => {
1616
flexWrap: 'wrap',
1717
flexDirection: 'row',
1818
alignContent: 'space-between',
19-
backgroundColor: '#E8E8E8',
19+
backgroundColor: 'var(--color-background)',
2020
zIndex: 2147483647,
2121
};
2222

@@ -38,11 +38,13 @@ const InfoBanner = ({ visible, onHide }) => {
3838
outline: 'none',
3939
backgroundColor: 'transparent',
4040
border: 'none',
41+
color: 'var(--color-text)',
42+
cursor: 'pointer',
4143
};
4244

4345
return (
4446
<div style={style}>
45-
<div stule={textStyle}>
47+
<div style={textStyle}>
4648
<p>Part 6 has new content about React Query, useReducer hook and React context.</p>
4749
<p>The new content replaces the chapter on Redux connect (that still remains online for a while).</p>
4850
<div style={{ marginTop: 10 }}><i>If you have already completed the part 6, this change has no effect on your progress.</i></div>

src/content/0/en/part0a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Exercise completion time statistics can be found via the [submission system](htt
4343

4444
You can discuss the course and related topics in our dedicated group on Discord <a target='_blank' href='https://study.cs.helsinki.fi/discord/join/fullstack'>https://study.cs.helsinki.fi/discord/join/fullstack</a> and on Telegram: <a target='_blank' href='https://t.me/fullstackcourse'>https://t.me/fullstackcourse</a>. Discord has fullstack_general and part-specific (channel names with fullstack prefix) channels for course-related discussion. Note that Discord's <i>chat channel is not suitable for course-related discussions</i>. Please join the conversation!
4545

46-
### How to ask help in Discord/Telegam
46+
### How to get help in Discord/Telegram
4747

4848
When you ask for help for a problem in the Discord/Telegram group your question should be as informative and precise as possible. If your question look like this
4949

src/content/1/en/part1a.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ The first rule of frontend web development:
149149

150150
> <i>keep the console open all the time</i>
151151
152-
Let us repeat this together: <i>I promise to keep the console open all the time</i> during this course, and the for the rest of my life when I'm doing web development.
152+
Let us repeat this together: <i>I promise to keep the console open all the time</i> during this course, and for the rest of my life when I'm doing web development.
153153

154154
It is also possible to render dynamic content inside of a component.
155155

@@ -343,7 +343,7 @@ I really hope your console was open. If it was not, remember what you promised:
343343

344344
> <i>I promise to keep the console open all the time during this course, and for the rest of my life when I'm doing web development</i>
345345
346-
Software development is hard. It gets even harder if one is not using all the possible available tools such as the web-console and debug printing with _console.log_. Professionals use both <i>all the time</i> and there is no single reason why a beginner should not adopt the use of these wonderful helper methods that will make the life so much easier.
346+
Software development is hard. It gets even harder if one is not using all the possible available tools such as the web-console and debug printing with _console.log_. Professionals use both <i>all the time</i> and there is no single reason why a beginner should not adopt the use of these wonderful helper methods that will make life so much easier.
347347

348348
### Some notes
349349

@@ -353,7 +353,7 @@ React has been configured to generate quite clear error messages. Despite this,
353353

354354
![screenshot of undefined prop error](../../images/1/2a.png)
355355

356-
As we already mentioned, that when programming with React it is possible and worthwhile to write <em>console.log()</em> commands (which print to the console) within your code.
356+
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.
357357

358358
Also, keep in mind that **React component names must be capitalized**. If you try defining a component as follows:
359359

src/content/1/en/part1d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ Programming is hard, that is why I will use all the possible means to make it ea
10311031
- I progress with small steps
10321032
- I will write lots of _console.log_ statements to make sure I understand how the code behaves and to help pinpointing problems
10331033
- If my code does not work, I will not write more code. Instead I start deleting the code until it works or just return to a state when everything was still working
1034-
- When I ask for help in the course Discord or Telegram channel or elsewhere I formulate my questions properly, see [here](/en/part0/general_info#how-to-ask-help-in-discord-telegam) how to ask help
1034+
- When I ask for help in the course Discord or Telegram channel or elsewhere I formulate my questions properly, see [here](http://fullstackopen.com/en/part0/general_info#how-to-ask-help-in-discord-telegam) how to ask for help
10351035

10361036
</div>
10371037

src/content/1/es/part1b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ console.log(t.length) // Se imprime 4
6262
console.log(t [1]) // -1 es impreso
6363
6464
t.forEach(value => {
65-
console.log (valor) // se imprimen los números 1, -1, 3, 5, cada uno en la línea propia
65+
console.log (value) // se imprimen los números 1, -1, 3, 5, cada uno en la línea propia
6666
})
6767
```
6868

src/content/1/fi/osa1a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ const App = () => {
635635
}
636636
```
637637

638-
**VAROITUS** älä yritä tehdä ohjelmassasi kaikkia komponentteja yhtä, sillä se johtaa lähes varmasti siihen että ohjelma ei toimi. Etene pieni askel kerrallaan, tee aluksi esim. komponentti <i>Header</i> ja vasta kun se toimii 100% varmasti, kannattaa edetä seuraavaan komponenttiin.
638+
**VAROITUS** älä yritä tehdä ohjelmassasi kaikkia komponentteja yhtä aikaa, sillä se johtaa lähes varmasti siihen että ohjelma ei toimi. Etene pieni askel kerrallaan, tee aluksi esim. komponentti <i>Header</i> ja vasta kun se toimii 100% varmasti, kannattaa edetä seuraavaan komponenttiin.
639639

640640
Huolellinen, pienin askelin eteneminen saattaa tuntua hitaalta, mutta se on itseasiassa <i> ylivoimaisesti nopein</i> tapa edetä. Kuuluisa ohjelmistokehittäjä Robert "Uncle Bob" Martin on todennut
641641

src/content/1/fi/osa1b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ lang: fi
99

1010
Kurssin aikana on web-sovelluskehityksen rinnalla tavoite ja tarve oppia riittävässä määrin JavaScriptia.
1111

12-
JavaScript on kehittynyt viime vuosina nopeaan tahtiin, ja käytämme kurssilla kielen uusimpien versioiden piirteitä. JavaScript-standardin virallinen nimi on [ECMAScript](https://en.wikipedia.org/wiki/ECMAScript). Tämän hetken tuorein versio on kesäkuussa 2023 julkaistu [ES13](https://www.ecma-international.org/ecma-262/), toiselta nimeltään ECMAScript 2023.
12+
JavaScript on kehittynyt viime vuosina nopeaan tahtiin, ja käytämme kurssilla kielen uusimpien versioiden piirteitä. JavaScript-standardin virallinen nimi on [ECMAScript](https://en.wikipedia.org/wiki/ECMAScript). Tämän hetken tuorein versio on kesäkuussa 2022 julkaistu [ES13](https://www.ecma-international.org/ecma-262/), toiselta nimeltään ECMAScript 2022.
1313

1414
Selaimet eivät vielä osaa kaikkia JavaScriptin uusimpien versioiden ominaisuuksia. Tämän takia selaimessa suoritetaan useimmiten koodia, joka on käännetty (englanniksi <i>transpiled</i>) uudemmasta JavaScriptin versiosta johonkin vanhempaan, laajemmin tuettuun versioon.
1515

src/content/2/fi/osa2b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const App = (props) => {
4343
}
4444
```
4545

46-
Voimme vielä havainnollsitaa tilanteen React Developer Toolsin avulla:
46+
Voimme vielä havainnollistaa tilanteen React Developer Toolsin avulla:
4747

4848
![](../../images/2/30.png)
4949

src/content/3/en/part3c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ In the following exercises, write all Mongoose-specific code into its own module
644644

645645
Change the backend so that new numbers are <i>saved to the database</i>. Verify that your frontend still works after the changes.
646646

647-
At this point, you can choose to simply allow users to create all phonebook entries. At this stage, the phonebook can have multiple entries for a person with the same name.
647+
At this stage, you can ignore whether there is already a person in the database with the same name as the person you are adding.
648648

649649
</div>
650650

src/content/6/en/part6d.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ The <i>App</i> component is now slightly simplified
138138

139139
```js
140140
import { useQuery } from 'react-query'
141-
import { getAnecdotes } from './requests' // highlight-line
141+
import { getNotes } from './requests' // highlight-line
142142

143143
const App = () => {
144144
// ...
@@ -153,9 +153,9 @@ The current code for the application is in [GitHub](https://github.com/fullstack
153153

154154
### Synchronizing data to the server using React Query
155155

156-
Data is already successfully retrieved from the server. Next, I'll make sure that the added and modified data is stored on the server. Let's start by adding new notes.
156+
Data is already successfully retrieved from the server. Next, we will make sure that the added and modified data is stored on the server. Let's start by adding new notes.
157157

158-
Let's make a function <i>addANote</i> to the file <i>requests.js</i> for saving new notes:
158+
Let's make a function <i>createNote</i> to the file <i>requests.js</i> for saving new notes:
159159

160160
```js
161161
import axios from 'axios'
@@ -332,7 +332,7 @@ const App = () => {
332332
}
333333
```
334334

335-
If you put a console.log statement to the code, you can see form browser console how often React Query causes the application to be re-rendered. The rule of thumb is that rerendering happens at least whenever there is a need for it, i.e. when the state of the query changes. You can read more about it e.g. [here](https://tkdodo.eu/blog/react-query-render-optimizations).
335+
If you put a console.log statement to the code, you can see from browser console how often React Query causes the application to be re-rendered. The rule of thumb is that rerendering happens at least whenever there is a need for it, i.e. when the state of the query changes. You can read more about it e.g. [here](https://tkdodo.eu/blog/react-query-render-optimizations).
336336

337337
The code for the application is in [GitHub](https://github.com/fullstack-hy2020/query-notes/tree/part6-3) in the branch <i>part6-3</i>.
338338

@@ -351,7 +351,7 @@ Most React applications need not only a way to temporarily store the served data
351351

352352
### Exercises 6.19.-6.21.
353353

354-
Now let's make a new version of the anecdote application that uses the React Query library. Take [this project]((https://github.com/fullstack-hy2020/query-anecdotes)) as your starting point. The project has a ready-installed JSON Server, the operation of which has been slightly modified. Start the server with <i>npm run server</i>.
354+
Now let's make a new version of the anecdote application that uses the React Query library. Take [this project](https://github.com/fullstack-hy2020/query-anecdotes) as your starting point. The project has a ready-installed JSON Server, the operation of which has been slightly modified. Start the server with <i>npm run server</i>.
355355

356356
#### Exercise 6.19
357357

@@ -363,7 +363,7 @@ The application should work in such a way that if there are problems communicati
363363

364364
You can find [here](https://react-query-v3.tanstack.com/guides/queries) info how to detect the possible errors.
365365

366-
You can simulate a problem with the server by e.g. turning off the JSON Server. Please note that in a problem situation, the query is first in the state <i>isLoading</i> for a while, because if a requesst fails, React Query tries the request a few times before it states that the request is not successful. You can optionally specify that no retries are made:
366+
You can simulate a problem with the server by e.g. turning off the JSON Server. Please note that in a problem situation, the query is first in the state <i>isLoading</i> for a while, because if a request fails, React Query tries the request a few times before it states that the request is not successful. You can optionally specify that no retries are made:
367367

368368

369369
```js
@@ -442,13 +442,13 @@ const App = () => {
442442
export default App
443443
```
444444

445-
The hook [useReducer](https://beta.reactjs.org/reference/react/useReducer) provides a mechanism to create a state for an application. The parameter for creating a state is the reduser function that handles state changes, and the initial value of the state:
445+
The hook [useReducer](https://beta.reactjs.org/reference/react/useReducer) provides a mechanism to create a state for an application. The parameter for creating a state is the reducer function that handles state changes, and the initial value of the state:
446446

447447
```js
448448
const [counter, counterDispatch] = useReducer(counterReducer, 0)
449449
```
450450

451-
The reduser function that handles state changes is similar to Redux's reducers, i.e. the function gets as parameters the current state and the action that changes the state. The function returns the new state updated based on the type and possible contents of the action:
451+
The reducer function that handles state changes is similar to Redux's reducers, i.e. the function gets as parameters the current state and the action that changes the state. The function returns the new state updated based on the type and possible contents of the action:
452452

453453
```js
454454
const counterReducer = (state, action) => {

0 commit comments

Comments
 (0)