Skip to content

Commit f0e4c11

Browse files
committed
tweaks
1 parent 4401269 commit f0e4c11

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

src/content/0/zh/part0a.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,10 @@ lang: zh
124124
- [申请第八章节的学分](https://fullstackopen.com/en/part0/general_info/#how-to-get-your-credits)
125125

126126
#### Part 9 - Full Stack Web Development: TypeScript (1 cr, CSM14110)
127-
<!-- By submitting at least 24/27 of the exercises for part 9 of the course, TypeScript, you can get one additional credit. It is recommended that you complete parts 0-7 before taking part 9.-->
128-
通过提交课程第九章节TypeScript的至少24/27道练习,你可以获得一个额外的学分。建议你在学习第9章节之前完成第0-7章节。
129-
<!-- - Submit at least 24/27 exercises for part 9.-->
127+
<!-- By submitting at least 24/29 of the exercises for part 9 of the course, TypeScript, you can get one additional credit. It is recommended that you complete parts 0-7 before taking part 9.-->
128+
通过提交课程第九章节TypeScript的至少24/29道练习,你可以获得一个额外的学分。建议你在学习第9章节之前完成第0-7章节。
130129

131-
- 提交至少24/27道第九章节的练习
130+
- 提交至少24/29道第九章节的练习
132131
<!-- - [Enroll in part 9 through the Open University](https://www.avoin.helsinki.fi/palvelut/esittely.aspx?s=otm-d9125f89-a440-48e1-898a-ee4e16b06cdb).-->
133132
- [通过开放大学报名参加第9章节](https://www.avoin.helsinki.fi/palvelut/esittely.aspx?s=otm-d9125f89-a440-48e1-898a-ee4e16b06cdb)
134133
<!-- - [Request credits for part 9](https://fullstackopen.com/en/part0/general_info/#how-to-get-your-credits).-->

src/content/1/en/part1a.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,8 @@ See this [example submission repository](https://github.com/fullstack-hy2020/exa
563563

564564
For each part of the course, there is a directory, which further branches into directories containing a series of exercises, like "unicafe" for part 1.
565565

566+
Most of the exercises of the course build a larger application, eg. courseinfo, unicafe and anecdotes in this part, bit by bit. In is enough to submit the completed application. You can make a commit after each exercise, but that is not compulsory. For example the course info app is build in the exercises 1.1.-1.5. It is just the end result after 1.5 that you need to submit!
567+
566568
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>.
567569

568570
<h4>1.1: course information, step1</h4>

src/content/1/en/part1c.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ Next, let's make a <i>Button</i> component for the buttons of our application. W
586586
```js
587587
const Button = (props) => {
588588
return (
589-
<button onClick={props.onClick}>
589+
<button onClick={props.handleClick}>
590590
{props.text}
591591
</button>
592592
)
@@ -610,15 +610,15 @@ const App = () => {
610610
<Display counter={counter}/>
611611
// highlight-start
612612
<Button
613-
onClick={increaseByOne}
613+
handleClick={increaseByOne}
614614
text='plus'
615615
/>
616616
<Button
617-
onClick={setToZero}
617+
handleClick={setToZero}
618618
text='zero'
619619
/>
620620
<Button
621-
onClick={decreaseByOne}
621+
handleClick={decreaseByOne}
622622
text='minus'
623623
/>
624624
// highlight-end
@@ -719,7 +719,7 @@ We can simplify the Button component as well.
719719
```js
720720
const Button = (props) => {
721721
return (
722-
<button onClick={props.onClick}>
722+
<button onClick={props.handleClick}>
723723
{props.text}
724724
</button>
725725
)
@@ -729,8 +729,8 @@ const Button = (props) => {
729729
We can use destructuring to get only the required fields from <i>props</i>, and use the more compact form of arrow functions:
730730
731731
```js
732-
const Button = ({ onClick, text }) => (
733-
<button onClick={onClick}>
732+
const Button = ({ handleClick, text }) => (
733+
<button onClick={handleClick}>
734734
{text}
735735
</button>
736736
)
@@ -739,7 +739,7 @@ const Button = ({ onClick, text }) => (
739739
We can simplify the Button component once more by declaring the return statement in just one line:
740740
741741
```js
742-
const Button = ({ onClick, text }) => <button onClick={onClick}>{text}</button>
742+
const Button = ({ handleClick, text }) => <button onClick={handleClick}>{text}</button>
743743
```
744744
745745
However, be careful to not oversimplify your components, as this makes adding complexity a more tedious task down the road.

0 commit comments

Comments
 (0)