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/reference/rsc/directives.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,11 @@ Direktif digunakan di [Komponen Server React](/reference/rsc/server-components).
10
10
11
11
<Intro>
12
12
13
+
<<<<<<< HEAD
13
14
Direktif memberikan instruksi kepada [bundler yang kompatibel dengan React Server Components](/learn/start-a-new-react-project#bleeding-edge-react-frameworks).
15
+
=======
16
+
Directives provide instructions to [bundlers compatible with React Server Components](/learn/start-a-new-react-project#full-stack-frameworks).
Copy file name to clipboardExpand all lines: src/content/reference/rsc/server-components.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,11 @@ title: "Komponen Server"
4
4
5
5
<RSC>
6
6
7
+
<<<<<<< HEAD
7
8
Komponen Server digunakan di [Komponen Server React](/learn/start-a-new-react-project#bleeding-edge-react-frameworks).
9
+
=======
10
+
Server Components are for use in [React Server Components](/learn/start-a-new-react-project#full-stack-frameworks).
11
+
>>>>>>> c0c955ed1d1c4fe3bf3e18c06a8d121902a01619
8
12
9
13
</RSC>
10
14
@@ -22,7 +26,11 @@ Lingkungan terpisah ini adalah "server" dalam Komponen Server React. Komponen Se
22
26
<Note>
23
27
24
28
29
+
<<<<<<< HEAD
25
30
#### Bagaimana cara membangun dukungan untuk Komponen Server? {/*how-do-i-build-support-for-server-components*/}
31
+
=======
32
+
While React Server Components in React 19 are stable and will not break between minor versions, the underlying APIs used to implement a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x.
33
+
>>>>>>> c0c955ed1d1c4fe3bf3e18c06a8d121902a01619
26
34
27
35
Meskipun Komponen Server React di React 19 sudah stabil dan tidak akan rusak antar versi mayor, API dasar yang digunakan untuk mengimplementasikan bundler atau framework Komponen Server React tidak mengikuti semver dan dapat berubah antar versi minor di React 19.x.
28
36
@@ -47,7 +55,7 @@ function Page({page}) {
47
55
setContent(data.content);
48
56
});
49
57
}, [page]);
50
-
58
+
51
59
return<div>{sanitizeHtml(marked(content))}</div>;
52
60
}
53
61
```
@@ -71,7 +79,7 @@ import sanitizeHtml from 'sanitize-html'; // Tidak termasuk dalam bundel
71
79
asyncfunctionPage({page}) {
72
80
// CATATAN: dimuat *saat* render, ketika aplikasi dibangun.
73
81
constcontent=awaitfile.readFile(`${page}.md`);
74
-
82
+
75
83
return<div>{sanitizeHtml(marked(content))}</div>;
76
84
}
77
85
```
@@ -115,7 +123,7 @@ function Note({id}) {
115
123
setNote(data.note);
116
124
});
117
125
}, [id]);
118
-
126
+
119
127
return (
120
128
<div>
121
129
<Author id={note.authorId} />
@@ -255,7 +263,7 @@ Ini bekerja dengan pertama-tama merender `Notes` sebagai Komponen Server, dan ke
255
263
<p>this is the second note</p>
256
264
</Expandable>
257
265
<!--...-->
258
-
</div>
266
+
</div>
259
267
</body>
260
268
```
261
269
@@ -272,8 +280,13 @@ import db from './database';
272
280
asyncfunctionPage({id}) {
273
281
// Akan suspend Komponen Server.
274
282
constnote=awaitdb.notes.get(id);
283
+
<<<<<<<HEAD
275
284
276
285
// CATATAN: tidak ditunggu, akan mulai di sini dan menunggu di klien.
286
+
=======
287
+
288
+
// NOTE: not awaited, will start here and await on the client.
Copy file name to clipboardExpand all lines: src/content/reference/rsc/use-client.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,11 @@ export default function RichTextEditor({ timestamp, text }) {
41
41
}
42
42
```
43
43
44
+
<<<<<<< HEAD
44
45
Saat file yang ditandai dengan `'use client'` diimpor dari Komponen Server, [bundler yang kompatibel](/learn/start-a-new-react-project#bleeding-edge-react-frameworks) akan memperlakukan impor modul sebagai batas antara kode yang dijalankan server dan kode yang dijalankan klien.
46
+
=======
47
+
When a file marked with `'use client'` is imported from a Server Component, [compatible bundlers](/learn/start-a-new-react-project#full-stack-frameworks) will treat the module import as a boundary between server-run and client-run code.
48
+
>>>>>>> c0c955ed1d1c4fe3bf3e18c06a8d121902a01619
45
49
46
50
Sebagai dependensi `RichTextEditor`, `formatDate` dan `Button` juga akan dievaluasi pada klien terlepas dari apakah modulnya berisi direktif `'use client'`. Perhatikan bahwa satu modul dapat dievaluasi pada server saat diimpor dari kode server dan pada klien saat diimpor dari kode klien.
0 commit comments