From 825ecb279b6fb98b34410f3158d62141bcf98923 Mon Sep 17 00:00:00 2001 From: afrianjunior Date: Sun, 30 Apr 2023 01:05:06 +0700 Subject: [PATCH 1/3] refactor(unmountComponentAtNode.md): init translate from english to indonesia --- src/content/reference/react-dom/unmountComponentAtNode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react-dom/unmountComponentAtNode.md b/src/content/reference/react-dom/unmountComponentAtNode.md index 12f11dc74d..4bddb541c9 100644 --- a/src/content/reference/react-dom/unmountComponentAtNode.md +++ b/src/content/reference/react-dom/unmountComponentAtNode.md @@ -4,7 +4,7 @@ title: unmountComponentAtNode -This API will be removed in a future major version of React. +API ini akan dihapus pada mayor versi berikutnya. In React 18, `unmountComponentAtNode` was replaced by [`root.unmount()`](/reference/react-dom/client/createRoot#root-unmount). From a19303710cfaf941c718d5d89a319e6c6ce4555d Mon Sep 17 00:00:00 2001 From: Chris Qiang Date: Sun, 30 Jul 2023 18:14:15 +0700 Subject: [PATCH 2/3] docs: translate unmountComponentAtNode page to Bahasa Indonesia --- .../react-dom/unmountComponentAtNode.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/content/reference/react-dom/unmountComponentAtNode.md b/src/content/reference/react-dom/unmountComponentAtNode.md index 4bddb541c9..4c309d6b5f 100644 --- a/src/content/reference/react-dom/unmountComponentAtNode.md +++ b/src/content/reference/react-dom/unmountComponentAtNode.md @@ -4,15 +4,15 @@ title: unmountComponentAtNode -API ini akan dihapus pada mayor versi berikutnya. +API ini akan dihapus pada versi mayor React yang akan datang. -In React 18, `unmountComponentAtNode` was replaced by [`root.unmount()`](/reference/react-dom/client/createRoot#root-unmount). +Pada React 18, `unmountComponentAtNode` sudah digantikan oleh [`root.unmount()`](/reference/react-dom/client/createRoot#root-unmount). -`unmountComponentAtNode` removes a mounted React component from the DOM. +`unmountComponentAtNode` menghapus komponen React yang telah terpasang dari DOM. ```js unmountComponentAtNode(domNode) @@ -24,11 +24,11 @@ unmountComponentAtNode(domNode) --- -## Reference {/*reference*/} +## Referensi {/*reference*/} ### `unmountComponentAtNode(domNode)` {/*unmountcomponentatnode*/} -Call `unmountComponentAtNode` to remove a mounted React component from the DOM and clean up its event handlers and state. +Panggil `unmountComponentAtNode` untuk menghapus komponen React yang telah terpasang dari DOM dan membersihkan *event handler* dan *state*-nya. ```js import { unmountComponentAtNode } from 'react-dom'; @@ -39,21 +39,21 @@ render(, domNode); unmountComponentAtNode(domNode); ``` -[See more examples below.](#usage) +[Lihat contoh lainnya di bawah ini.](#usage) -#### Parameters {/*parameters*/} +#### Parameter {/*parameters*/} -* `domNode`: A [DOM element.](https://developer.mozilla.org/en-US/docs/Web/API/Element) React will remove a mounted React component from this element. +* `domNode`: Sebuah [elemen DOM.](https://developer.mozilla.org/en-US/docs/Web/API/Element) React akan menghapus komponen React yang terpasang dari elemen ini. -#### Returns {/*returns*/} +#### Pengembalian {/*returns*/} -`unmountComponentAtNode` returns `true` if a component was unmounted and `false` otherwise. +`unmountComponentAtNode` mengembalikan `true` jika sebuah komponen telah dicopot dan `false` jika tidak. --- -## Usage {/*usage*/} +## Penggunaan {/*usage*/} -Call `unmountComponentAtNode` to remove a mounted React component from a browser DOM node and clean up its event handlers and state. +Panggil `unmountComponentAtNode` untuk menghapus komponen React yang sudah terpasang dari simpul DOM peramban dan bersihkan *event handler* dan *state*-nya. ```js [[1, 5, ""], [2, 5, "rootNode"], [2, 8, "rootNode"]] import { render, unmountComponentAtNode } from 'react-dom'; @@ -67,11 +67,11 @@ unmountComponentAtNode(rootNode); ``` -### Removing a React app from a DOM element {/*removing-a-react-app-from-a-dom-element*/} +### Menghapus aplikasi React dari elemen DOM {/*removing-a-react-app-from-a-dom-element*/} -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. +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*. -In this example, clicking "Render React App" will render a React app. Click "Unmount React App" to destroy it: +Pada contoh ini, mengklik "*Render* Aplikasi React" akan me-*render* aplikasi React. Klik "Lepas Aplikasi React" untuk menghancurkannya: @@ -80,8 +80,8 @@ In this example, clicking "Render React App" will render a React app. Click "Unm My app - - + +
From 98ede09e3aa154046740d66cabf832e37e928730 Mon Sep 17 00:00:00 2001 From: Chris Qiang Date: Sun, 30 Jul 2023 21:35:44 +0700 Subject: [PATCH 3/3] =?UTF-8?q?docs:=20Limit=20`dan`=20conjugations,=20Pen?= =?UTF-8?q?gembalian=20=E2=86=92=20Kembalian,=20and=20rephrase=20some=20se?= =?UTF-8?q?ntences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/content/reference/react-dom/unmountComponentAtNode.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/reference/react-dom/unmountComponentAtNode.md b/src/content/reference/react-dom/unmountComponentAtNode.md index 4c309d6b5f..445c132e1d 100644 --- a/src/content/reference/react-dom/unmountComponentAtNode.md +++ b/src/content/reference/react-dom/unmountComponentAtNode.md @@ -28,7 +28,7 @@ unmountComponentAtNode(domNode) ### `unmountComponentAtNode(domNode)` {/*unmountcomponentatnode*/} -Panggil `unmountComponentAtNode` untuk menghapus komponen React yang telah terpasang dari DOM dan membersihkan *event handler* dan *state*-nya. +Panggil `unmountComponentAtNode` untuk menghapus komponen React yang telah terpasang dari DOM dan membersihkan *event handler* beserta *state*-nya. ```js import { unmountComponentAtNode } from 'react-dom'; @@ -45,15 +45,15 @@ unmountComponentAtNode(domNode); * `domNode`: Sebuah [elemen DOM.](https://developer.mozilla.org/en-US/docs/Web/API/Element) React akan menghapus komponen React yang terpasang dari elemen ini. -#### Pengembalian {/*returns*/} +#### Kembalian {/*returns*/} -`unmountComponentAtNode` mengembalikan `true` jika sebuah komponen telah dicopot dan `false` jika tidak. +`unmountComponentAtNode` mengembalikan `true` jika komponen tersebut telah berhasil dilepas dan `false` jika tidak. --- ## Penggunaan {/*usage*/} -Panggil `unmountComponentAtNode` untuk menghapus komponen React yang sudah terpasang dari simpul DOM peramban dan bersihkan *event handler* dan *state*-nya. +Panggil `unmountComponentAtNode` untuk menghapus komponen React yang sudah terpasang dari simpul DOM peramban dan bersihkan *event handler* beserta *state*-nya. ```js [[1, 5, ""], [2, 5, "rootNode"], [2, 8, "rootNode"]] import { render, unmountComponentAtNode } from 'react-dom';