Skip to content

Commit d5ca349

Browse files
committed
part 1 and 1a
1 parent ab837e5 commit d5ca349

File tree

4 files changed

+45
-49
lines changed

4 files changed

+45
-49
lines changed

src/content/1/en/part1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ lang: en
99
In this part, we will familiarize ourselves with the React-library, which we will be using to write the code that runs in the browser. We will also look at some features of JavaScript that are important for understanding React.
1010

1111
<i>Part updated 21th March 2024</i>
12-
- <i>About LLMs in sotware development</i>
12+
- <i>About LLMs in software development</i>
1313

1414
</div>

src/content/1/en/part1a.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ Instead of Vite you can also use the older generation tool [create-react-app](ht
7474

7575
The way to start the application is also different in CRA, it is started with a command
7676

77-
```
77+
```bash
7878
npm start
7979
```
8080

8181
in contrast to Vite's
8282

83-
```
83+
```bash
8484
npm run dev
8585
```
8686

@@ -110,7 +110,6 @@ By default, the file <i>index.html</i> doesn't contain any HTML markup that is v
110110
<script type="module" src="/src/main.jsx"></script>
111111
</body>
112112
</html>
113-
114113
```
115114

116115
You can try adding there some HTML to the file. However, when using React, all content that needs to be rendered is usually defined as React components.
@@ -263,6 +262,7 @@ but when writing JSX, the tag needs to be closed:
263262
### Multiple components
264263

265264
Let's modify the file <i>App.jsx</i> as follows:
265+
266266
```js
267267
// highlight-start
268268
const Hello = () => {
@@ -303,7 +303,6 @@ const App = () => {
303303

304304
**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
305305

306-
307306
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.
308307

309308
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.
@@ -378,7 +377,7 @@ I really hope your console was open. If it was not, remember what you promised:
378377

379378
> <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>
380379
381-
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.
380+
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 his life so much easier.
382381

383382
### Possible error message
384383

@@ -412,7 +411,7 @@ module.exports = {
412411
}
413412
```
414413

415-
We will get to know ESLint in more detail [in part 3](/osa3/validointi_ja_es_lint#lint).
414+
We will get to know ESLint in more detail [in part 3](/en/part3/validation_and_es_lint#lint).
416415

417416
### Some notes
418417

@@ -450,7 +449,7 @@ const App = () => {
450449
}
451450
```
452451

453-
the page is not going to display the content defined within the Footer component, and instead React only creates an empty [footer](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer) element, i.e. the built-in HTML element instead of the custom React element of the same name. If you change the first letter of the component name to a capital letter, then React creates a <i>div</i>-element defined in the Footer component, which is rendered on the page.
452+
the page is not going to display the content defined within the footer component, and instead React only creates an empty [footer](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer) element, i.e. the built-in HTML element instead of the custom React element of the same name. If you change the first letter of the component name to a capital letter, then React creates a <i>div</i>-element defined in the Footer component, which is rendered on the page.
454453

455454
Note that the content of a React component (usually) needs to contain **one root element**. If we, for example, try to define the component <i>App</i> without the outermost <i>div</i>-element:
456455

@@ -634,7 +633,7 @@ Most of the exercises of the course build a larger application, eg. courseinfo,
634633

635634
For each web application for a series of exercises, it is recommended to submit all files relating to that application, except for the directory <i>node\_modules</i>.
636635

637-
<h4>1.1: course information, step1</h4>
636+
<h4>1.1: Course Information, step 1</h4>
638637

639638
<i>The application that we will start working on in this exercise will be further developed in a few of the following exercises. In this and other upcoming exercise sets in this course, it is enough to only submit the final state of the application. If desired, you may also create a commit for each exercise of the series, but this is entirely optional.</i>
640639

@@ -680,7 +679,7 @@ const App = () => {
680679
export default App
681680
```
682681

683-
and remove extra files App.css and index.css, and the directory assets.
682+
and remove the extra files App.css and index.css, also remove the directory assets.
684683

685684
Unfortunately, the entire application is in the same component. Refactor the code so that it consists of three new components: <i>Header</i>, <i>Content</i>, and <i>Total</i>. All data still resides in the <i>App</i> component, which passes the necessary data to each component using <i>props</i>. <i>Header</i> takes care of rendering the name of the course, <i>Content</i> renders the parts and their number of exercises and <i>Total</i> renders the total number of exercises.
686685

@@ -710,7 +709,7 @@ Careful, small-step progress may seem slow, but it is actually <i> by far the fa
710709
711710
that is, according to Martin, careful progress with small steps is even the only way to be fast.
712711

713-
<h4>1.2: course information, step2</h4>
712+
<h4>1.2: Course Information, step 2</h4>
714713

715714
Refactor the <i>Content</i> component so that it does not render any names of parts or their number of exercises by itself. Instead, it only renders three <i>Part</i> components of which each renders the name and number of exercises of one part.
716715

src/content/1/es/part1.md

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

99
En esta parte, nos familiarizaremos con la librería React, que usaremos para escribir el código que se ejecuta en el navegador. También veremos algunas características de JavaScript que son importantes para comprender React.
1010

11-
<i>Parte actualizada el 11 de agosto de 2023</i>
12-
- <i>Create React App fue reemplazado con Vite</i>
11+
<i>Parte actualizada el 21 de Marzo de 2024</i>
12+
- <i>Acerca de LLMs en el desarrollo de software</i>
1313

1414
</div>

0 commit comments

Comments
 (0)