Skip to content

Commit 516607b

Browse files
wip
Signed-off-by: Jie Peng <[email protected]>
1 parent 6e65978 commit 516607b

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/content/learn/index.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
---
2-
title: Quick Start
2+
title: 快速開始
33
---
44

55
<Intro>
66

7-
Welcome to the React documentation! This page will give you an introduction to the 80% of React concepts that you will use on a daily basis.
7+
歡迎來到 React 文件!本頁將為你介紹日常使用的 80% React 概念。
88

99
</Intro>
1010

1111
<YouWillLearn>
1212

13-
- How to create and nest components
14-
- How to add markup and styles
15-
- How to display data
16-
- How to render conditions and lists
17-
- How to respond to events and update the screen
18-
- How to share data between components
13+
- 如何建立和巢狀 component
14+
- 如何加入 markup 和樣式
15+
- 如何顯示資料
16+
- 如何 render 條件和列表
17+
- 如何回應事件和更新畫面
18+
- 如何在 component 之間共享資料
1919

2020
</YouWillLearn>
2121

22-
## Creating and nesting components {/*components*/}
22+
## 建立和巢狀 component {/*components*/}
2323

24-
React apps are made out of *components*. A component is a piece of the UI (user interface) that has its own logic and appearance. A component can be as small as a button, or as large as an entire page.
24+
React 應用程式是由 *components* 組成的。Component 是具有自己的邏輯和外觀的 UI(使用者介面)的一部分。Component 可以像按鈕一樣小,也可以像整個頁面一樣大。
2525

26-
React components are JavaScript functions that return markup:
26+
React component 是回傳 markup 的 JavaScript 函式。
2727

2828
```js
2929
function MyButton() {
@@ -33,7 +33,7 @@ function MyButton() {
3333
}
3434
```
3535
36-
Now that you've declared `MyButton`, you can nest it into another component:
36+
現在你已經宣告 `MyButton`,你可以將它嵌入另一個 component 中。
3737
3838
```js {5}
3939
export default function MyApp() {
@@ -46,9 +46,9 @@ export default function MyApp() {
4646
}
4747
```
4848
49-
Notice that `<MyButton />` starts with a capital letter. That's how you know it's a React component. React component names must always start with a capital letter, while HTML tags must be lowercase.
49+
注意 `<MyButton />` 開頭是大寫字母,這就是你知道它是 React component 的方式。React component 名稱一定要以大寫字母開頭,而 HTML markup 則必須為小寫字母。
5050
51-
Have a look at the result:
51+
請看一下結果:
5252
5353
<Sandpack>
5454
@@ -73,7 +73,7 @@ export default function MyApp() {
7373

7474
</Sandpack>
7575

76-
The `export default` keywords specify the main component in the file. If you're not familiar with some piece of JavaScript syntax, [MDN](https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/export) and [javascript.info](https://javascript.info/import-export) have great references.
76+
`export default` 關鍵字指定檔案中的主要 component。如果你對某些 JavaScript 語法不熟悉,[MDN](https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/export) [javascript.info](https://javascript.info/import-export) 都有很棒的參考資料。
7777

7878
## Writing markup with JSX {/*writing-markup-with-jsx*/}
7979

0 commit comments

Comments
 (0)