Skip to content

Commit 00dc923

Browse files
Merge pull request #287 from reactjs/docs/react-dev-tools
2 parents e4d2284 + 0531e02 commit 00dc923

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
---
2-
title: React Developer Tools
2+
title: React 開發者工具
33
---
44

55
<Intro>
66

7-
Use React Developer Tools to inspect React [components](/learn/your-first-component), edit [props](/learn/passing-props-to-a-component) and [state](/learn/state-a-components-memory), and identify performance problems.
7+
使用 React 開發者工具檢查 React [component](/learn/your-first-component)、編輯 [props](/learn/passing-props-to-a-component) [state](/learn/state-a-components-memory),並辨認效能問題。
88

99
</Intro>
1010

11-
## Browser extension {/*browser-extension*/}
11+
## 瀏覽器擴充元件 {/*browser-extension*/}
1212

13-
The easiest way to debug websites built with React is to install the React Developer Tools browser extension. It is available for several popular browsers:
13+
debug React 建構的網站最簡單的方式是安裝 React 開發者瀏覽器擴充元件。它可以在一些流行的瀏覽器上使用:
1414

1515
* [Install for **Chrome**](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)
1616
* [Install for **Firefox**](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/)
1717
* [Install for **Edge**](https://microsoftedge.microsoft.com/addons/detail/react-developer-tools/gpphkfbcpidddadnkolkpfckpihlkkil)
1818

19-
Now, if you visit a website **built with React**, you will see the _Components_ and _Profiler_ panels.
19+
現在,如果你拜訪**React 建構**的網站,你將會看到 _Components_ _Profiler_ 控制面板。
2020

2121
![React Developer Tools extension](/images/docs/react-devtools-extension.png)
2222

23-
### Safari and other browsers {/*safari-and-other-browsers*/}
24-
For other browsers (for example, Safari), install the [`react-devtools`](https://www.npmjs.com/package/react-devtools) npm package:
23+
### Safari 和其他瀏覽器 {/*safari-and-other-browsers*/}
24+
對於其他的瀏覽器(例如,Safari),安裝 [`react-devtools`](https://www.npmjs.com/package/react-devtools) npm package
2525
```bash
2626
# Yarn
2727
yarn global add react-devtools
@@ -30,26 +30,26 @@ yarn global add react-devtools
3030
npm install -g react-devtools
3131
```
3232

33-
Next open the developer tools from the terminal:
33+
接著從 terminal 打開開發者工具:
3434
```bash
3535
react-devtools
3636
```
3737

38-
Then connect your website by adding the following `<script>` tag to the beginning of your website's `<head>`:
38+
然後透過在你的網站 `<head>` 的起始加入以下 `<script>` tag 來連接你的網站:
3939
```html {3}
4040
<html>
4141
<head>
4242
<script src="http://localhost:8097"></script>
4343
```
4444

45-
Reload your website in the browser now to view it in developer tools.
45+
重新載入網頁現在你可以看到開發者工具。
4646

4747
![React Developer Tools standalone](/images/docs/react-devtools-standalone.png)
4848

4949
## Mobile (React Native) {/*mobile-react-native*/}
50-
React Developer Tools can be used to inspect apps built with [React Native](https://reactnative.dev/) as well.
50+
React 開發者工具也可以用來檢測由 [React Native](https://reactnative.dev/) 建構的應用程式。
5151

52-
The easiest way to use React Developer Tools is to install it globally:
52+
使用 React 開發者工具最簡單的方式就是全域安裝它:
5353
```bash
5454
# Yarn
5555
yarn global add react-devtools
@@ -58,13 +58,13 @@ yarn global add react-devtools
5858
npm install -g react-devtools
5959
```
6060

61-
Next open the developer tools from the terminal.
61+
接著從 terminal 打開開發者工具:
6262
```bash
6363
react-devtools
6464
```
6565

66-
It should connect to any local React Native app that's running.
66+
它應該連接到你任何在本機端執行的 React Native 應用程式。
6767

68-
> Try reloading the app if developer tools doesn't connect after a few seconds.
68+
> 如果在幾秒鐘內沒有連接上開發者工具,請嘗試重新載入應用程式。
6969
70-
[Learn more about debugging React Native.](https://reactnative.dev/docs/debugging)
70+
[學習更多關於 React Native 的 debugging。](https://reactnative.dev/docs/debugging)

beta/src/sidebarLearn.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88
"path": "",
99
"routes": [
1010
{
11-
"title": "Installation",
11+
"title": "安裝",
1212
"path": "/learn/installation",
1313
"routes": [
1414
{
15-
"title": "Start a New React Project",
15+
"title": "開始一個新的 React 專案",
1616
"path": "/learn/start-a-new-react-project"
1717
},
1818
{
19-
"title": "Add React to a Website",
19+
"title": " React 加入到網頁",
2020
"path": "/learn/add-react-to-a-website"
2121
},
2222
{
23-
"title": "Editor Setup",
23+
"title": "編輯器設定",
2424
"path": "/learn/editor-setup"
2525
},
2626
{
27-
"title": "React Developer Tools",
27+
"title": "React 開發者工具",
2828
"path": "/learn/react-developer-tools"
2929
}
3030
]

content/docs/add-react-to-a-website.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ return (
168168

169169
將 JSX 加入到項目裡並不需要複雜的工具,例如一個 bundler 或開發伺服器。本質上,加入 JSX **就像加入一個 CSS preprocessor。**這只需要你安裝 [Node.js](https://nodejs.org/) 到你的電腦裡。
170170

171-
在終端機轉到你的項目文件夾裡,再貼上以下的兩行指令:
171+
在 terminal 轉到你的項目文件夾裡,再貼上以下的兩行指令:
172172

173173
1. **第一步:** 執行 `npm init -y`(如果失敗了,[這裡有方法解決](https://gist.github.com/gaearon/246f6380610e262f8a648e3e51cad40d)
174174
2. **第二步:** 執行 `npm install babel-cli@6 babel-preset-react-app@3`

0 commit comments

Comments
 (0)