You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/blog/2020/12/21/data-fetching-with-react-server-components.md
+1-5Lines changed: 1 addition & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,7 @@ date: 2020/12/21
5
5
description: 2020 đã là một năm dài. Khi năm này khép lại, chúng tôi muốn chia sẻ một Bản Cập Nhật Đặc Biệt về nghiên cứu của chúng tôi về zero-bundle-size React Server Components.
6
6
---
7
7
8
-
<<<<<<< HEAD
9
-
December 21, 2020 bởi [Dan Abramov](https://twitter.com/dan_abramov), [Lauren Tan](https://twitter.com/potetotes), [Joseph Savona](https://twitter.com/en_JS), và [Sebastian Markbåge](https://twitter.com/sebmarkbage)
10
-
=======
11
-
December 21, 2020 by [Dan Abramov](https://bsky.app/profile/danabra.mov), [Lauren Tan](https://twitter.com/potetotes), [Joseph Savona](https://twitter.com/en_JS), and [Sebastian Markbåge](https://twitter.com/sebmarkbage)
12
-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
8
+
December 21, 2020 bởi [Dan Abramov](https://bsky.app/profile/danabra.mov), [Lauren Tan](https://twitter.com/potetotes), [Joseph Savona](https://twitter.com/en_JS), và [Sebastian Markbåge](https://twitter.com/sebmarkbage)
Copy file name to clipboardExpand all lines: src/content/learn/add-react-to-an-existing-project.md
+4-22Lines changed: 4 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -20,15 +20,9 @@ Giả sử bạn có một ứng dụng web tại `example.com` được phát t
20
20
21
21
Đây là cách chúng tôi đề xuất để cài đặt:
22
22
23
-
<<<<<<< HEAD
24
23
1.**Xây dựng phần React của ứng dụng của bạn** sử dụng một trong những [nền tảng ứng dụng (framework) sử dụng React](/learn/start-a-new-react-project).
25
-
2.**Chỉ định `/some-app` là *đường dẫn gốc*** trong cấu hình ứng dụng của bạn. (xem hướng dẫn với: [Next.js](https://nextjs.org/docs/api-reference/next.config.js/basepath), [Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/)).
24
+
2.**Chỉ định `/some-app` là *đường dẫn gốc*** trong cấu hình ứng dụng của bạn. (xem hướng dẫn với: [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/)).
26
25
3.**Cấu hình máy chủ của bạn hoặc một proxy** để tất cả các requests ở `/some-app/` được xử lý bởi ứng dụng React của bạn.
27
-
=======
28
-
1.**Build the React part of your app** using one of the [React-based frameworks](/learn/start-a-new-react-project).
29
-
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/)).
30
-
3.**Configure your server or a proxy** so that all requests under `/some-app/` are handled by your React app.
31
-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
32
26
33
27
Điều này đảm bảo phần React của ứng dụng của bạn có thể được [hưởng lợi từ các tiêu chuẩn tốt nhất](/learn/start-a-new-react-project#can-i-use-react-without-a-framework) đã được tích hợp sẵn trong các Frameworks đó.
34
28
@@ -51,11 +45,7 @@ Môi trường JavaScript module hóa cho phép bạn viết các component Reac
51
45
52
46
***Nếu ứng dụng của bạn đã được chia thành các tệp sử dụng các câu lệnh `import`,** hãy cố gắng sử dụng thiết lập hiện có của bạn. Kiểm tra xem viết `<div />` trong mã JS có gây lỗi cú pháp không. Nếu nó gây ra lỗi cú pháp, bạn có thể cần [chuyển đổi mã JavaScript của mình bằng Babel](https://babeljs.io/setup), và kích hoạt [Babel React preset](https://babeljs.io/docs/babel-preset-react) để sử dụng JSX.
53
47
54
-
<<<<<<< HEAD
55
-
***Nếu ứng dụng của bạn không có cài đặt cho việc biên dịch các module JavaScript,** hãy cài đặt với [Vite](https://vitejs.dev/). Cộng động Vite duy trì [nhiều tích hợp với các framework back-end](https://github.com/vitejs/awesome-vite#integrations-with-backends), bao gồm Rails, Django, và Laravel. Nếu framework backend của bạn không được liệt kê, [hãy làm theo hướng dẫn này](https://vitejs.dev/guide/backend-integration.html) để tích hợp Vite với backend của bạn bằng cách thủ công.
56
-
=======
57
-
***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.
58
-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
48
+
***Nếu ứng dụng của bạn không có cài đặt cho việc biên dịch các module JavaScript,** hãy cài đặt với [Vite](https://vitejs.dev/). Cộng động Vite duy trì [nhiều tích hợp với các framework back-end](https://github.com/vitejs/awesome-vite#integrations-with-backends), bao gồm Rails, Django, và Laravel. Nếu framework backend của bạn không được liệt kê, [hãy làm theo hướng dẫn này](https://vite.dev/guide/backend-integration.html) để tích hợp Vite với backend của bạn bằng cách thủ công.
59
49
60
50
Để kiểm tra xem thiết lập của bạn hoạt động, chạy lệnh này trong thư mục dự án của bạn:
61
51
@@ -72,12 +62,8 @@ Sau đó thêm những dòng code này vào đầu của file JavaScript chính
72
62
<html>
73
63
<head><title>My app</title></head>
74
64
<body>
75
-
<<<<<<< HEAD
76
-
<!-- Nội dung website của bạn trước đó (chúng sẽ được xoá trong ví dụ này) -->
77
-
=======
78
-
<!-- Your existing page content (in this example, it gets replaced) -->
65
+
<!-- Nội dung website của bạn trước đó (chúng sẽ được thay thế trong ví dụ này) -->
79
66
<divid="root"></div>
80
-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
81
67
</body>
82
68
</html>
83
69
```
@@ -99,11 +85,7 @@ Nếu toàn bộ nội dung của trang web của bạn đã bị thay thế b
99
85
100
86
<Note>
101
87
102
-
<<<<<<< HEAD
103
-
Việc tích hợp môi trường JavaScript theo module vào một dự án có sẵn có thể làm bạn cảm thấy hơi đáng sợ trong lần đầu tiên, nhưng sẽ rất đáng công sức bỏ ra! Nếu bạn gặp khó khăn, hãy xem [tài liệu của cộng đồng](/community) hoặc qua [Vite Chat](https://chat.vitejs.dev/).
104
-
=======
105
-
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/).
106
-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
88
+
Việc tích hợp môi trường JavaScript theo module vào một dự án có sẵn có thể làm bạn cảm thấy hơi đáng sợ trong lần đầu tiên, nhưng sẽ rất đáng công sức bỏ ra! Nếu bạn gặp khó khăn, hãy xem [tài liệu của cộng đồng](/community) hoặc qua [Vite Chat](https://chat.vite.dev/).
Copy file name to clipboardExpand all lines: src/content/learn/installation.md
+7-34Lines changed: 7 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -8,20 +8,7 @@ React được thiết kế từ đầu với khả năng áp dụng vào dự
8
8
9
9
</Intro>
10
10
11
-
<<<<<<< HEAD
12
-
<YouWillLearnisChapter={true}>
13
-
14
-
*[Cách để bắt đầu một dự án sử dụng React](/learn/start-a-new-react-project)
15
-
*[Cách để thêm React vào dự án đang có sẵn](/learn/add-react-to-an-existing-project)
16
-
*[Cách để thiết lập trình soạn thảo](/learn/editor-setup)
17
-
*[Cách để cài đặt React Developer Tools](/learn/react-developer-tools)
18
-
19
-
</YouWillLearn>
20
-
21
11
## Thử dùng React {/*try-react*/}
22
-
=======
23
-
## Try React {/*try-react*/}
24
-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
25
12
26
13
Bạn không phải cài đặt bất cứ thứ gì để trải nghiệm React. Hãy thử chỉnh sửa sandbox này!
27
14
@@ -41,46 +28,32 @@ export default function App() {
41
28
42
29
Bạn có thể chỉnh sửa trực tiếp hoặc mở nó trong một tab mới bằng cách ấn vào nút "Fork" ở góc trên bên phải.
43
30
44
-
<<<<<<< HEAD
45
-
Hầu hết các trang trong tài liệu React chứa các sandbox như thế này. Ngoài trang tài liệu React, có rất nhiều các online sandbox hỗ trợ React: ví dụ, [CodeSandbox](https://codesandbox.io/s/new), [StackBlitz](https://stackblitz.com/fork/react), or [CodePen.](https://codepen.io/pen?&editors=0010&layout=left&prefill_data_id=3f4569d1-1b11-4bce-bd46-89090eed5ddb)
31
+
Hầu hết các trang trong tài liệu React chứa các sandbox như thế này. Ngoài trang tài liệu React, có rất nhiều các online sandbox hỗ trợ React: ví dụ, [CodeSandbox](https://codesandbox.io/s/new), [StackBlitz](https://stackblitz.com/fork/react), or [CodePen.](https://codepen.io/pen?template=QWYVwWN)
46
32
47
33
### Thử dùng React trên máy tính của bạn {/*try-react-locally*/}
48
-
=======
49
-
Most pages in the React documentation contain sandboxes like this. Outside of the React documentation, there are many online sandboxes that support React: for example, [CodeSandbox](https://codesandbox.io/s/new), [StackBlitz](https://stackblitz.com/fork/react), or [CodePen.](https://codepen.io/pen?template=QWYVwWN)
50
-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
51
34
52
35
Để thử sử dụng React trên máy tính của bạn, [tải về trang HTML này.](https://gist.githubusercontent.com/gaearon/0275b1e1518599bbeafcde4722e79ed1/raw/db72dcbf3384ee1708c4a07d3be79860db04bff0/example.html) Mở nó trong trình soạn thảo và trình duyệt của bạn!
53
36
54
-
<<<<<<< HEAD
55
-
## Bắt đầu một dự án React mới {/*start-a-new-react-project*/}
56
-
57
-
Nếu bạn muốn xây dựng một ứng dụng hoặc một website một cách đầy đủ với React, [bắt đầu một dự án React mới.](/learn/start-a-new-react-project)
58
-
=======
59
-
## Creating a React App {/*creating-a-react-app*/}
37
+
## Tạo một ứng dụng React {/*creating-a-react-app*/}
60
38
61
-
If you want to start a new React app, you can [create a React app](/learn/creating-a-react-app)using a recommended framework.
39
+
Nếu bạn muốn bắt đầu xây dựng một ứng dụng React, bạn có thể [tạo một ứng dụng React](/learn/creating-a-react-app)bằng cách sử dụng một framework được giới thiệu.
62
40
63
-
## Build a React App from Scratch {/*build-a-react-app-from-scratch*/}
41
+
## Xây dựng một ứng dụng React từ đầu {/*build-a-react-app-from-scratch*/}
64
42
65
-
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).
66
-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
43
+
Nếu một framework không phù hợp cho dự án của bạn, bạn có thể xây dựng một framework của chính bạn, hoặc bạn chỉ muốn học những cái cơ bản của ứng dụng React, bạn có thể [xây dựng một ứng dụng React từ đầu](/learn/build-a-react-app-from-scratch).
67
44
68
45
## Thêm React vào một dự án có sẵn {/*add-react-to-an-existing-project*/}
69
46
70
-
<<<<<<< HEAD
71
47
Nếu bạn muốn thử sử dụng React cho ứng dụng đang có sẵn của bạn hoặc một website, [thêm React vào một dự án có sẵn.](/learn/add-react-to-an-existing-project)
72
-
=======
73
-
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)
74
48
75
49
76
50
<Note>
77
51
78
-
#### Should I use Create React App? {/*should-i-use-create-react-app*/}
52
+
#### Tôi có nên tạo một ứng dụng React (Create React App)? {/*should-i-use-create-react-app*/}
79
53
80
-
No. Create React App has been deprecated. For more information, see [Sunsetting Create React App](/blog/2025/02/14/sunsetting-create-react-app).
54
+
Không nên. Create React App đã bị lỗi thời. Thêm thông tin, xem tại [Loại bỏ Create React App](/blog/2025/02/14/sunsetting-create-react-app).
Copy file name to clipboardExpand all lines: src/content/learn/react-developer-tools.md
+3-25Lines changed: 3 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -53,31 +53,9 @@ Hãy tải lại trang web của bạn ngay để có thể nhìn thấy nó v
53
53

54
54
55
55
## Mobile (React Native) {/*mobile-react-native*/}
56
-
<<<<<<< HEAD
57
-
Công cụ phát triển React có thể được sử dụng để kiểm tra các ứng dụng được xây dựng bằng [React Native](https://reactnative.dev/) as well.
58
56
59
-
Cách đơn giản nhất để sử dụng công cụ phát triển React là cài đặt nó toàn cục trên hệ thống của bạn:
60
-
```bash
61
-
# Yarn
62
-
yarn global add react-devtools
63
-
=======
64
-
65
-
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.
66
-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
67
-
68
-
[Learn more about debugging in React Native.](https://reactnative.dev/docs/debugging)
69
-
70
-
<<<<<<< HEAD
71
-
Sau đó mở công cụ phát triển từ terminal.
72
-
```bash
73
-
react-devtools
74
-
```
75
-
76
-
Nó sẽ kết nối với bất kỳ ứng dụng React Native nào đang chạy trên cùng một máy tính.
57
+
Để kiểm tra các ứng dụng được xây dựng bằng [React Native](https://reactnative.dev/), bạn có thể sử dụng [React Native DevTools](https://reactnative.dev/docs/react-native-devtools), trình gỡ lỗi tích hợp sẵn với sự liên kết sâu với React Developer Tools. Tất cả các tính năng hoạt động tương tự như tiện ích mở rộng trên trình duyệt, bao gồm cả việc làm nổi bật và chọn các phần tử gốc (native).
77
58
78
-
> Hãy thử tải lại ứng dụng nếu công cụ phát triển không kết nối sau vài giây.
59
+
[Tìm hiểu thêm về cách debug trong React Native.](https://reactnative.dev/docs/debugging)
79
60
80
-
[Tìm hiểu thêm về debugging với React Native.](https://reactnative.dev/docs/debugging)
81
-
=======
82
-
> For versions of React Native earlier than 0.76, please use the standalone build of React DevTools by following the [Safari and other browsers](#safari-and-other-browsers) guide above.
83
-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
61
+
> Đối với các phiên bản React Native trước 0.76, vui lòng sử dụng bản dựng độc lập của React DevTools bằng cách làm theo hướng dẫn [Safari và các trình duyệt khác](#safari-and-other-browsers) ở trên.
0 commit comments