Skip to content

Commit b54d3b5

Browse files
chez14afrianjunior
andauthored
docs: translate unmountComponentAtNode (#600)
Co-authored-by: afrianjunior <afrian.junior26@gmail.com>
1 parent 6ffac9f commit b54d3b5

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/content/reference/react-dom/unmountComponentAtNode.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ title: unmountComponentAtNode
44

55
<Deprecated>
66

7-
This API will be removed in a future major version of React.
7+
API ini akan dihapus pada versi mayor React yang akan datang.
88

9-
In React 18, `unmountComponentAtNode` was replaced by [`root.unmount()`](/reference/react-dom/client/createRoot#root-unmount).
9+
Pada React 18, `unmountComponentAtNode` sudah digantikan oleh [`root.unmount()`](/reference/react-dom/client/createRoot#root-unmount).
1010

1111
</Deprecated>
1212

1313
<Intro>
1414

15-
`unmountComponentAtNode` removes a mounted React component from the DOM.
15+
`unmountComponentAtNode` menghapus komponen React yang telah terpasang dari DOM.
1616

1717
```js
1818
unmountComponentAtNode(domNode)
@@ -24,11 +24,11 @@ unmountComponentAtNode(domNode)
2424

2525
---
2626

27-
## Reference {/*reference*/}
27+
## Referensi {/*reference*/}
2828

2929
### `unmountComponentAtNode(domNode)` {/*unmountcomponentatnode*/}
3030

31-
Call `unmountComponentAtNode` to remove a mounted React component from the DOM and clean up its event handlers and state.
31+
Panggil `unmountComponentAtNode` untuk menghapus komponen React yang telah terpasang dari DOM dan membersihkan *event handler* beserta *state*-nya.
3232

3333
```js
3434
import { unmountComponentAtNode } from 'react-dom';
@@ -39,21 +39,21 @@ render(<App />, domNode);
3939
unmountComponentAtNode(domNode);
4040
```
4141

42-
[See more examples below.](#usage)
42+
[Lihat contoh lainnya di bawah ini.](#usage)
4343

44-
#### Parameters {/*parameters*/}
44+
#### Parameter {/*parameters*/}
4545

46-
* `domNode`: A [DOM element.](https://developer.mozilla.org/en-US/docs/Web/API/Element) React will remove a mounted React component from this element.
46+
* `domNode`: Sebuah [elemen DOM.](https://developer.mozilla.org/en-US/docs/Web/API/Element) React akan menghapus komponen React yang terpasang dari elemen ini.
4747

48-
#### Returns {/*returns*/}
48+
#### Kembalian {/*returns*/}
4949

50-
`unmountComponentAtNode` returns `true` if a component was unmounted and `false` otherwise.
50+
`unmountComponentAtNode` mengembalikan `true` jika komponen tersebut telah berhasil dilepas dan `false` jika tidak.
5151

5252
---
5353

54-
## Usage {/*usage*/}
54+
## Penggunaan {/*usage*/}
5555

56-
Call `unmountComponentAtNode` to remove a <CodeStep step={1}>mounted React component</CodeStep> from a <CodeStep step={2}>browser DOM node</CodeStep> and clean up its event handlers and state.
56+
Panggil `unmountComponentAtNode` untuk menghapus <CodeStep step={1}>komponen React yang sudah terpasang</CodeStep> dari <CodeStep step={2}>simpul DOM peramban</CodeStep> dan bersihkan *event handler* beserta *state*-nya.
5757

5858
```js [[1, 5, "<App />"], [2, 5, "rootNode"], [2, 8, "rootNode"]]
5959
import { render, unmountComponentAtNode } from 'react-dom';
@@ -67,11 +67,11 @@ unmountComponentAtNode(rootNode);
6767
```
6868

6969

70-
### Removing a React app from a DOM element {/*removing-a-react-app-from-a-dom-element*/}
70+
### Menghapus aplikasi React dari elemen DOM {/*removing-a-react-app-from-a-dom-element*/}
7171

72-
Occasionally, you may want to "sprinkle" React on an existing page, or a page that is not fully written in React. In those cases, you may need to "stop" the React app, by removing all of the UI, state, and listeners from the DOM node it was rendered to.
72+
Terkadang, Anda mungkin ingin "menghiasi" dengan React halaman yang sudah ada, atau halaman yang tidak sepenuhnya ditulis dalam React. Dalam kasus tersebut, Anda mungkin perlu "menghentikan" aplikasi React, dengan menghapus semua UI, *state*, dan *listener* dari simpul DOM yang di-*render*.
7373

74-
In this example, clicking "Render React App" will render a React app. Click "Unmount React App" to destroy it:
74+
Pada contoh ini, mengklik "*Render* Aplikasi React" akan me-*render* aplikasi React. Klik "Lepas Aplikasi React" untuk menghancurkannya:
7575

7676
<Sandpack>
7777

@@ -80,8 +80,8 @@ In this example, clicking "Render React App" will render a React app. Click "Unm
8080
<html>
8181
<head><title>My app</title></head>
8282
<body>
83-
<button id='render'>Render React App</button>
84-
<button id='unmount'>Unmount React App</button>
83+
<button id='render'><i>Render</i> Aplikasi React</button>
84+
<button id='unmount'>Lepas Aplikasi React</button>
8585
<!-- This is the React App node -->
8686
<div id='root'></div>
8787
</body>

0 commit comments

Comments
 (0)