Skip to content

Commit 1c1fc8c

Browse files
resolved conflicts
1 parent bfbfed3 commit 1c1fc8c

File tree

14 files changed

+18
-1140
lines changed

14 files changed

+18
-1140
lines changed

.eslintrc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,14 @@
22
"root": true,
33
"extends": "next/core-web-vitals",
44
"parser": "@typescript-eslint/parser",
5-
<<<<<<< HEAD
6-
"plugins": ["@typescript-eslint", "eslint-plugin-react-compiler"],
7-
=======
85
"plugins": ["@typescript-eslint", "eslint-plugin-react-compiler", "local-rules"],
9-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
106
"rules": {
117
"no-unused-vars": "off",
128
"@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}],
139
"react-hooks/exhaustive-deps": "error",
1410
"react/no-unknown-property": ["error", {"ignore": ["meta"]}],
15-
<<<<<<< HEAD
16-
"react-compiler/react-compiler": "error"
17-
=======
1811
"react-compiler/react-compiler": "error",
1912
"local-rules/lint-markdown-code-blocks": "error"
20-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
2113
},
2214
"env": {
2315
"node": true,

.github/workflows/discord_notify.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ name: Discord Notify
22

33
on:
44
pull_request_target:
5-
<<<<<<< HEAD
6-
types: [ labeled ]
7-
8-
jobs:
9-
notify:
10-
if: ${{ github.event.label.name == 'React Core Team' }}
11-
=======
125
types: [opened, ready_for_review]
136

147
permissions: {}
@@ -25,7 +18,6 @@ jobs:
2518
notify:
2619
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
2720
needs: check_maintainer
28-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
2921
runs-on: ubuntu-latest
3022
steps:
3123
- name: Discord Webhook Action
@@ -37,8 +29,4 @@ jobs:
3729
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
3830
embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
3931
embed-description: ${{ github.event.pull_request.body }}
40-
<<<<<<< HEAD
41-
embed-url: ${{ github.event.pull_request.html_url }}
42-
=======
4332
embed-url: ${{ github.event.pull_request.html_url }}
44-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691

package.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
"ci-check": "npm-run-all prettier:diff --parallel lint tsc lint-heading-ids rss deadlinks",
1919
"tsc": "tsc --noEmit",
2020
"start": "next start",
21-
<<<<<<< HEAD
22-
"postinstall": "is-ci || husky install .husky",
23-
=======
2421
"postinstall": "yarn --cwd eslint-local-rules install && is-ci || husky install .husky",
25-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
2622
"check-all": "npm-run-all prettier lint:fix tsc rss",
2723
"rss": "node scripts/generateRss.js",
2824
"deadlinks": "node scripts/deadLinkChecker.js",
@@ -67,12 +63,8 @@
6763
"asyncro": "^3.0.0",
6864
"autoprefixer": "^10.4.2",
6965
"babel-eslint": "10.x",
70-
<<<<<<< HEAD
71-
"babel-plugin-react-compiler": "19.0.0-beta-e552027-20250112",
72-
=======
7366
"babel-plugin-react-compiler": "^19.1.0-rc.3",
7467
"chalk": "4.1.2",
75-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
7668
"eslint": "7.x",
7769
"eslint-config-next": "12.0.3",
7870
"eslint-config-react-app": "^5.2.1",

src/content/community/conferences.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,10 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c
1010

1111
## Upcoming Conferences {/*upcoming-conferences*/}
1212

13-
<<<<<<< HEAD
14-
### React Paris 2025 {/*react-paris-2025*/}
15-
March 20 - 21, 2024. In-person in Paris, France (hybrid event)
16-
17-
[Website](https://react.paris/) - [Twitter](https://x.com/BeJS_)
18-
=======
1913
### React Universe Conf 2025 {/*react-universe-conf-2025*/}
2014
September 2-4, 2025. Wrocław, Poland.
2115

2216
[Website](https://www.reactuniverseconf.com/) - [Twitter](https://twitter.com/react_native_eu) - [LinkedIn](https://www.linkedin.com/events/reactuniverseconf7163919537074118657/)
23-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
2417

2518
### React Alicante 2025 {/*react-alicante-2025*/}
2619
October 2-4, 2025. Alicante, Spain.
@@ -77,20 +70,6 @@ June 13 - 17, 2025. In-person in Amsterdam, Netherlands + remote (hybrid event)
7770

7871
[Website](https://reactsummit.com/) - [Twitter](https://x.com/reactsummit)
7972

80-
<<<<<<< HEAD
81-
### React Universe Conf 2025 {/*react-universe-conf-2025*/}
82-
September 2-4, 2025. Wrocław, Poland.
83-
84-
[Website](https://www.reactuniverseconf.com/) - [Twitter](https://twitter.com/react_native_eu) - [LinkedIn](https://www.linkedin.com/events/reactuniverseconf7163919537074118657/)
85-
86-
### React India 2025 {/*react-india-2025*/}
87-
October 31 - November 01, 2025. In-person in Goa, India (hybrid event) + Oct 15 2025 - remote day
88-
89-
[Website](https://www.reactindia.io) - [Twitter](https://twitter.com/react_india) - [Facebook](https://www.facebook.com/ReactJSIndia) - [Youtube](https://www.youtube.com/channel/UCaFbHCBkPvVv1bWs_jwYt3w)
90-
91-
92-
## Past Conferences {/*past-conferences*/}
93-
=======
9473
### React Norway 2025 {/*react-norway-2025*/}
9574
June 13, 2025. In-person in Oslo, Norway + remote (virtual event)
9675

@@ -125,7 +104,6 @@ April 3 (Reanimated Training) + April 4 (Conference), 2025. Paris, France.
125104
December 13 & 16, 2024. In-person in Berlin, Germany + remote (hybrid event)
126105

127106
[Website](https://reactday.berlin/) - [Twitter](https://x.com/reactdayberlin)
128-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
129107

130108
### React Day Berlin 2024 {/*react-day-berlin-2024*/}
131109
December 13 & 16, 2024. In-person in Berlin, Germany + remote (hybrid event)

src/content/learn/add-react-to-an-existing-project.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,11 @@ title: 將 React 加入到一個現有的專案
2020

2121
以下是我們推薦的設定方式:
2222

23-
<<<<<<< HEAD
2423
1. 使用其中一個[基於 React 的框架]((/learn/start-a-new-react-project))**建構你的應用程式中的 React 部分**
25-
2. 在你的框架設定中將 **`/some-app` 指定為 *基本路徑***(這裡是如何設定:[Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath)[Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/))。
24+
2. **在你的框架設定中指定 `/some-app` 作為*基本路徑***(這裡是如何設定:[Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath)[Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/))。
2625
3. **設定你的伺服器或代理**,讓所有在 `/some-app/` 下的請求都由 React 應用程式處理。
2726

28-
這可以確保你的應用程式中 React 部分能夠[受益於這些框架所內建的最佳實踐](/learn/start-a-new-react-project#can-i-use-react-without-a-framework)
29-
=======
30-
1. **Build the React part of your app** using one of the [React-based frameworks](/learn/start-a-new-react-project).
31-
2. **Specify `/some-app` as the *base path*** in your framework's configuration (here's how: [Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath), [Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/)).
32-
3. **Configure your server or a proxy** so that all requests under `/some-app/` are handled by your React app.
33-
34-
This ensures the React part of your app can [benefit from the best practices](/learn/build-a-react-app-from-scratch#consider-using-a-framework) baked into those frameworks.
35-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
27+
這可確保你的應用程式的 React 部分可以[受益於融入這些框架的最佳實踐](/learn/build-a-react-app-from-scratch#consider-using-a-framework)
3628

3729
許多基於 React 的框架都是 full-stack,可以讓你的 React 應用程式獲得伺服器的優勢。然而,但即使你不能或不想在伺服器上執行 JavaScript,也可以使用相同的方法。在這種情況下,請將 HTML/CSS/JS 匯出(例如 Next.js 的 [`next export` 輸出](https://nextjs.org/docs/advanced-features/static-html-export)、Gatsby 的預設匯出)放在 `/some-app/` 上。
3830

@@ -53,11 +45,7 @@ This ensures the React part of your app can [benefit from the best practices](/l
5345

5446
* **如果你的應用程式已經拆分成使用 `import` 語句的檔案**,請嘗試使用你已經設定好的設定。檢查在你的 JS 程式碼中寫入 `<div />` 是否會導致語法錯誤。如果它導致了語法錯誤,則可能需要[使用 Babel 轉換你的 JavaScript 程式碼](https://babeljs.io/setup),並啟用 [Babel React preset](https://babeljs.io/docs/babel-preset-react) 來使用 JSX。
5547

56-
<<<<<<< HEAD
57-
* **如果你的應用程式沒有現有的 JavaScript module 的編譯設定**,請使用 [Vite](https://vitejs.dev/) 進行設定。Vite 社群維護[與後端框架的多個整合](https://github.com/vitejs/awesome-vite#integrations-with-backends),包括 Rails、Django 和 Laravel。如果你的後端框架未被列出,請按照此指南[手動將 Vite 建構與你的後端整合](https://vitejs.dev/guide/backend-integration.html)
58-
=======
59-
* **If your app doesn't have an existing setup for compiling JavaScript modules,** set it up with [Vite](https://vite.dev/). The Vite community maintains [many integrations with backend frameworks](https://github.com/vitejs/awesome-vite#integrations-with-backends), including Rails, Django, and Laravel. If your backend framework is not listed, [follow this guide](https://vite.dev/guide/backend-integration.html) to manually integrate Vite builds with your backend.
60-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
48+
* **如果你的應用程式沒有現有的 JavaScript module 的編譯設定**,請使用 [Vite](https://vitejs.dev/) 進行設定。Vite 社群維護[與後端框架的多個整合](https://github.com/vitejs/awesome-vite#integrations-with-backends),包括 Rails、Django 和 Laravel。如果你的後端框架未被列出,請[按照此指南](https://vite.dev/guide/backend-integration.html)手動將 Vite 建構與你的後端整合。
6149

6250
為了檢查你的設定是否正常運作,請在你的專案資料夾中執行此命令:
6351

@@ -97,11 +85,7 @@ root.render(<h1>Hello, world</h1>);
9785

9886
<Note>
9987

100-
<<<<<<< HEAD
101-
將一個模組化的 JavaScript 環境整合到現有專案中,對於第一次嘗試的人來說可能會感到令人生畏,但它是值得的!如果你卡住了,請嘗試使用我們的[社群資源](/community)[Vite Chat](https://chat.vitejs.dev/)
102-
=======
103-
Integrating a modular JavaScript environment into an existing project for the first time can feel intimidating, but it's worth it! If you get stuck, try our [community resources](/community) or the [Vite Chat](https://chat.vite.dev/).
104-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
88+
將一個模組化的 JavaScript 環境整合到現有專案中,對於第一次嘗試的人來說可能會感到令人生畏,但它是值得的!如果你卡住了,請嘗試使用我們的[社群資源](/community)[Vite Chat](https://chat.vite.dev/)
10589

10690
</Note>
10791

src/content/learn/installation.md

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,7 @@ React 從一開始就被設計成可以逐步採用。你可以根據自己的
88

99
</Intro>
1010

11-
<<<<<<< HEAD
12-
<YouWillLearn isChapter={true}>
13-
14-
* [如何開始一個新的 React 專案](/learn/start-a-new-react-project)
15-
* [如何將 React 加入到一個現有的專案](/learn/add-react-to-an-existing-project)
16-
* [如何設定編輯器](/learn/editor-setup)
17-
* [如何安裝 React 開發者工具](/learn/react-developer-tools)
18-
19-
</YouWillLearn>
20-
2111
## 嘗試 React {/*try-react*/}
22-
=======
23-
## Try React {/*try-react*/}
24-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
2512

2613
你不需要安裝任何東西來嘗試 React。試試看編輯這個 sandbox!
2714

@@ -43,32 +30,19 @@ export default function App() {
4330

4431
React 文件中的大多數頁面都包含像這樣的 sandbox 範例。在 React 文件之外,有許多支援 React 的線上 sandbox,例如 [CodeSandbox](https://codesandbox.io/s/new)[StackBlitz](https://stackblitz.com/fork/react)[CodePen](https://codepen.io/pen?template=QWYVwWN)
4532

46-
<<<<<<< HEAD
47-
### 在本機端嘗試 React {/*try-react-locally*/}
48-
4933
在你的電腦本機端嘗試 React,[下載這個 HTML 頁面。](https://gist.githubusercontent.com/gaearon/0275b1e1518599bbeafcde4722e79ed1/raw/db72dcbf3384ee1708c4a07d3be79860db04bff0/example.html) 在你的編輯器和瀏覽器打開它!
5034

51-
## 開始一個新的 React 專案 {/*start-a-new-react-project*/}
52-
53-
如果你想要完全使用 React 建立一個應用程式或是網站,[開始一個新的 React 專案。](/learn/start-a-new-react-project)
54-
=======
55-
To try React locally on your computer, [download this HTML page.](https://gist.githubusercontent.com/gaearon/0275b1e1518599bbeafcde4722e79ed1/raw/db72dcbf3384ee1708c4a07d3be79860db04bff0/example.html) Open it in your editor and in your browser!
56-
57-
## Creating a React App {/*creating-a-react-app*/}
35+
## 建立一個 React 應用程式 {/*creating-a-react-app*/}
5836

59-
If you want to start a new React app, you can [create a React app](/learn/creating-a-react-app) using a recommended framework.
37+
如果你想要建立一個 React 應用程式,你可以使用推薦的 framework 來[建立一個 React 應用程式](/learn/creating-a-react-app)
6038

61-
## Build a React App from Scratch {/*build-a-react-app-from-scratch*/}
39+
## 從頭開始建立 React 應用程式 {/*build-a-react-app-from-scratch*/}
6240

63-
If a framework is not a good fit for your project, you prefer to build your own framework, or you just want to learn the basics of a React app you can [build a React app from scratch](/learn/build-a-react-app-from-scratch).
64-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
41+
如果框架不適合你的專案,你傾向建立自己的 framework,或者你只是想學習 React 應用程式的基礎知識,那麼你可以[從頭開始建立一個 React 應用程式](/learn/build-a-react-app-from-scratch)
6542

6643
## 將 React 加入到一個現有的專案 {/*add-react-to-an-existing-project*/}
6744

68-
<<<<<<< HEAD
6945
如果你想要在你現有的應用程式或網站嘗試使用 React,[將 React 加入到一個現有的專案。](/learn/add-react-to-an-existing-project)
70-
=======
71-
If want to try using React in your existing app or a website, you can [add React to an existing project.](/learn/add-react-to-an-existing-project)
7246

7347

7448
<Note>
@@ -78,7 +52,6 @@ If want to try using React in your existing app or a website, you can [add React
7852
No. Create React App has been deprecated. For more information, see [Sunsetting Create React App](/blog/2025/02/14/sunsetting-create-react-app).
7953

8054
</Note>
81-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
8255

8356
## 下一步 {/*next-steps*/}
8457

src/content/learn/react-developer-tools.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ react-devtools
5454

5555
## 行動裝置(React Native) {/*mobile-react-native*/}
5656

57-
<<<<<<< HEAD
5857
若要檢查使用 [React Native](https://reactnative.dev/) 建立的應用程式,你可以使用 [React Native DevTools](https://reactnative.dev/docs/react-native-devtools),這是一個深度整合 React Developer Tools 的內建偵錯工具。所有功能都與瀏覽器擴充功能完全相同,包含原生元素的高亮顯示和選取功能。
59-
=======
60-
To inspect apps built with [React Native](https://reactnative.dev/), you can use [React Native DevTools](https://reactnative.dev/docs/react-native-devtools), the built-in debugger that deeply integrates React Developer Tools. All features work identically to the browser extension, including native element highlighting and selection.
61-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
6258

6359
[深入了解 React Native 的偵錯功能。](https://reactnative.dev/docs/debugging)
6460

src/content/learn/render-and-commit.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,7 @@ export default function Image() {
8484

8585
這段過程是遞迴的:如果更新的 component 回傳其他的 component,React 將會 render _那個_ component,如果 component 又回傳其他的 component,React 會接著 render _下一個_ component,以此類推。這個過程將一直持續到沒有回傳更多的 component,React 才知道應該在螢幕上顯示什麼。
8686

87-
<<<<<<< HEAD
8887
在接下來的範例,React 將會呼叫 `Gallery()``Image()` 幾次
89-
=======
90-
In the following example, React will call `Gallery()` and `Image()` several times:
91-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
9288

9389
<Sandpack>
9490

@@ -152,17 +148,10 @@ Rendering 必須永遠是一個[純運算](/learn/keeping-components-pure)
152148

153149
## 步驟 3:React 把更改 commit 到 DOM {/*step-3-react-commits-changes-to-the-dom*/}
154150

155-
<<<<<<< HEAD
156151
在 rendering(呼叫)你的 component 後,React 將會更改你的 DOM。
157152

158153
* **對於初始 render,** React 會使用 [`appendChild()`](https://developer.mozilla.org/docs/Web/API/Node/appendChild) DOM API 在螢幕上顯示所有你建立的 DOM 節點。
159154
* **對於重新 render,** React 會採取最小必要的操作 (在 rendering 時計算!),以使得 DOM 與 rendering 後的的輸出相符。
160-
=======
161-
After rendering (calling) your components, React will modify the DOM.
162-
163-
* **For the initial render,** React will use the [`appendChild()`](https://developer.mozilla.org/docs/Web/API/Node/appendChild) DOM API to put all the DOM nodes it has created on screen.
164-
* **For re-renders,** React will apply the minimal necessary operations (calculated while rendering!) to make the DOM match the latest rendering output.
165-
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
166155

167156
**React 只有在 render 時有差異才會更改 DOM 節點。** 例如,這裡有一個 component,每秒從其 parent 傳遞不同的 props 重新 render。請注意,你可以在 `<input>` 中輸入一些文字,更新它的 `value`,但是這些文字不會在 conponent 重新 render 時消失。
168157

0 commit comments

Comments
 (0)