Skip to content

Commit 77016b7

Browse files
authored
New Indonesian translation: react-dom: Components Overview Page
2 parents ab1d594 + fdba0bb commit 77016b7

File tree

1 file changed

+38
-39
lines changed
  • src/content/reference/react-dom/components

1 file changed

+38
-39
lines changed

src/content/reference/react-dom/components/index.md

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
11
---
2-
title: "React DOM Components"
2+
title: "Komponen DOM React"
33
---
44

55
<Intro>
6-
7-
React supports all of the browser built-in [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) and [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Element) components.
8-
6+
React mendukung semua komponen [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) dan [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Element) bawaan peramban.
97
</Intro>
108

119
---
1210

13-
## Common components {/*common-components*/}
11+
## Komponen-Komponen Umum {/*common-components*/}
1412

15-
All of the built-in browser components support some props and events.
13+
Semua komponen bawaan peramban mendukung beberapa *props* dan *events*.
1614

17-
* [Common components (e.g. `<div>`)](/reference/react-dom/components/common)
15+
* [Komponen-Komponen Umum (contoh: `<div>`)](/reference/react-dom/components/common)
1816

19-
This includes React-specific props like `ref` and `dangerouslySetInnerHTML`.
17+
Ini termasuk *props* spesifik React seperti `ref` dan `dangerouslySetInnerHTML`.
2018

2119
---
2220

23-
## Form components {/*form-components*/}
21+
## Komponen *Form* {/*form-components*/}
2422

25-
These built-in browser components accept user input:
23+
Komponen-komponen bawaan peramban ini menerima masukan dari pengguna:
2624

2725
* [`<input>`](/reference/react-dom/components/input)
2826
* [`<select>`](/reference/react-dom/components/select)
2927
* [`<textarea>`](/reference/react-dom/components/textarea)
3028

31-
They are special in React because passing the `value` prop to them makes them *[controlled.](/reference/react-dom/components/input#controlling-an-input-with-a-state-variable)*
29+
Komponen-komponen tersebut spesial dalam React karena dengan mengoper *prop* `value` ke dalamnya, akan membuatnya menjadi *[controlled component.](/reference/react-dom/components/input#controlling-an-input-with-a-state-variable)*
3230

3331
---
3432

35-
## All HTML components {/*all-html-components*/}
33+
## Semua komponen HTML {/*all-html-components*/}
3634

37-
React supports all built-in browser HTML components. This includes:
35+
React mendukung semua komponen HTML bawaan peramban. Ini termasuk:
3836

3937
* [`<aside>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside)
4038
* [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio)
@@ -140,38 +138,39 @@ React supports all built-in browser HTML components. This includes:
140138

141139
<Note>
142140

143-
Similar to the [DOM standard,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React uses a `camelCase` convention for prop names. For example, you'll write `tabIndex` instead of `tabindex`. You can convert existing HTML to JSX with an [online converter.](https://transform.tools/html-to-jsx)
141+
Serupa dengan [standar panduan DOM,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React menggunakan konvensi *`camelCase`* untuk penamaan *props*. Sebagai contoh, Anda disarankan menulis `tabIndex` ketimbang `tabindex`. Anda dapat mengubah HTML yang telah ada menjadi JSX menggunakan [*online converter.*](https://transform.tools/html-to-jsx)
144142

145143
</Note>
146144

147145
---
148146

149-
### Custom HTML elements {/*custom-html-elements*/}
147+
### Elemen HTML *Custom* {/*custom-html-elements*/}
148+
149+
Jika Anda *render* sebuah *tag* menggunakan tanda hubung, seperti `<my-element>`, React akan mengasumsikan Anda untuk *render* [elemen HTML *custom*.](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) Pada React, cara kerja *rendering* pada elemen *custom* akan berbeda dengan *rendering* pada *tags* bawaan peramban:
150150

151-
If you render a tag with a dash, like `<my-element>`, React will assume you want to render a [custom HTML element.](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) In React, rendering custom elements works differently from rendering built-in browser tags:
151+
- Semua props dari *custom element* akan diserialisasikan menjadi *strings* dan selalu disetel menggunakan *attributes*.
152+
- *Custom elements* menerima `class` ketimbang `className`, dan `for` ketimbang `htmlFor`.
152153

153-
- All custom element props are serialized to strings and are always set using attributes.
154-
- Custom elements accept `class` rather than `className`, and `for` rather than `htmlFor`.
154+
Jika Anda `render` sebuah elemen HTML bawaan peramban dengan atribut [`is`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/is), maka itu akan diperlakukan sebagai *custom element*.
155155

156-
If you render a built-in browser HTML element with an [`is`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/is) attribute, it will also be treated as a custom element.
157156

158157
<Note>
159158

160-
[A future version of React will include more comprehensive support for custom elements.](https://github.com/facebook/react/issues/11347#issuecomment-1122275286)
159+
[Versi React mendatang akan menambahkan lebih banyak dukungan komprehensif untuk *custom elements*.](https://github.com/facebook/react/issues/11347#issuecomment-1122275286)
161160

162-
You can try it by upgrading React packages to the most recent experimental version:
161+
Anda dapat mencobanya dengan memperbarui *packages* React ke versi eksperimental terbaru:
163162

164163
- `react@experimental`
165164
- `react-dom@experimental`
166165

167-
Experimental versions of React may contain bugs. Don't use them in production.
166+
Versi eksperimental mungkin mengandung *bugs*. Jangan digunakan di *production*.
168167

169168
</Note>
170169
---
171170

172-
## All SVG components {/*all-svg-components*/}
171+
## Semua komponen SVG {/*all-svg-components*/}
173172

174-
React supports all built-in browser SVG components. This includes:
173+
React mendukung semua komponen SVG bawaan peramban. Ini termasuk:
175174

176175
* [`<a>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/a)
177176
* [`<animate>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate)
@@ -242,20 +241,20 @@ React supports all built-in browser SVG components. This includes:
242241

243242
<Note>
244243

245-
Similar to the [DOM standard,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React uses a `camelCase` convention for prop names. For example, you'll write `tabIndex` instead of `tabindex`. You can convert existing SVG to JSX with an [online converter.](https://transform.tools/)
246-
247-
Namespaced attributes also have to be written without the colon:
248-
249-
* `xlink:actuate` becomes `xlinkActuate`.
250-
* `xlink:arcrole` becomes `xlinkArcrole`.
251-
* `xlink:href` becomes `xlinkHref`.
252-
* `xlink:role` becomes `xlinkRole`.
253-
* `xlink:show` becomes `xlinkShow`.
254-
* `xlink:title` becomes `xlinkTitle`.
255-
* `xlink:type` becomes `xlinkType`.
256-
* `xml:base` becomes `xmlBase`.
257-
* `xml:lang` becomes `xmlLang`.
258-
* `xml:space` becomes `xmlSpace`.
259-
* `xmlns:xlink` becomes `xmlnsXlink`.
244+
Serupa dengan [standar panduan DOM,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React menggunakan konvensi `camelCase` untuk penamaan *props*. Sebagai contoh, Anda disarankan untuk menuliskan `tabIndex` ketimbang `tabindex`. Anda juga dapat mengubah SVG yang telah ada ke JSX menggunakan [*online converter.*](https://transform.tools/)
245+
246+
Atribut *namespaced* juga harus dituliskan tanpa tanda titik dua:
247+
248+
* `xlink:actuate` menjadi `xlinkActuate`.
249+
* `xlink:arcrole` menjadi `xlinkArcrole`.
250+
* `xlink:href` menjadi `xlinkHref`.
251+
* `xlink:role` menjadi `xlinkRole`.
252+
* `xlink:show` menjadi `xlinkShow`.
253+
* `xlink:title` menjadi `xlinkTitle`.
254+
* `xlink:type` menjadi `xlinkType`.
255+
* `xml:base` menjadi `xmlBase`.
256+
* `xml:lang` menjadi `xmlLang`.
257+
* `xml:space` menjadi `xmlSpace`.
258+
* `xmlns:xlink` menjadi `xmlnsXlink`.
260259

261260
</Note>

0 commit comments

Comments
 (0)