From 0c65baa2813526914add1c7bcc9130572473ed54 Mon Sep 17 00:00:00 2001 From: tegarjgap Date: Sun, 27 Oct 2019 18:31:01 +0700 Subject: [PATCH 01/22] translate Implementation Notes into Indonesian language --- content/docs/implementation-notes.md | 487 +++++++++++++-------------- 1 file changed, 243 insertions(+), 244 deletions(-) diff --git a/content/docs/implementation-notes.md b/content/docs/implementation-notes.md index a035a5edf..1290d710f 100644 --- a/content/docs/implementation-notes.md +++ b/content/docs/implementation-notes.md @@ -1,6 +1,6 @@ --- id: implementation-notes -title: Implementation Notes +title: Catatan Implementasi layout: contributing permalink: docs/implementation-notes.html prev: codebase-overview.html @@ -9,93 +9,92 @@ redirect_from: - "contributing/implementation-notes.html" --- -This section is a collection of implementation notes for the [stack reconciler](/docs/codebase-overview.html#stack-reconciler). +Bagian ini adalah kumpulan catatan implementasi untuk [*stack reconciler*](/docs/codebase-overview.html#stack-reconciler). -It is very technical and assumes a strong understanding of React public API as well as how it's divided into core, renderers, and the reconciler. If you're not very familiar with the React codebase, read [the codebase overview](/docs/codebase-overview.html) first. +Ini sangat teknis dan mengasumsikan pemahaman yang kuat tentang API publik React serta bagaimana itu dibagi menjadi inti, *renderers*, dan *reconciler*. Jika anda tidak terlalu mengenal basis kode React, baca dahulu [ikhtisar basis kode](/docs/codebase-overview.html). -It also assumes an understanding of the [differences between React components, their instances, and elements](/blog/2015/12/18/react-components-elements-and-instances.html). +Ini juga mengasumsikan pemahaman tentang [perbedaan antara komponen React, *instances* mereka, dan elemen](/blog/2015/12/18/react-components-elements-and-instances.html). -The stack reconciler was used in React 15 and earlier. It is located at [src/renderers/shared/stack/reconciler](https://github.com/facebook/react/tree/15-stable/src/renderers/shared/stack/reconciler). +*Stack reconciler* digunakan dalam React 15 dan sebelumnya. Terletak di [*src/renderers/shared/stack/reconciler*](https://github.com/facebook/react/tree/15-stable/src/renderers/shared/stack/reconciler). -### Video: Building React from Scratch {#video-building-react-from-scratch} +### Video: Membangun React dari awal {#video-building-react-from-scratch} -[Paul O'Shannessy](https://twitter.com/zpao) gave a talk about [building React from scratch](https://www.youtube.com/watch?v=_MAD4Oly9yg) that largely inspired this document. +[Paul O'Shannessy](https://twitter.com/zpao) memberi ceramah tentang [membangun React dari awal](https://www.youtube.com/watch?v=_MAD4Oly9yg) yang sebagian besar menginspirasi dokumen ini. -Both this document and his talk are simplifications of the real codebase so you might get a better understanding by getting familiar with both of them. +Baik dokumen ini maupun ceramahnya merupakan penyederhanaan basis kode nyata jadi anda mungkin mendapatkan pemahaman yang lebih baik dengan membiasakan diri dengan mereka berdua. -### Overview {#overview} +### Ikhtisar {#overview} -The reconciler itself doesn't have a public API. [Renderers](/docs/codebase-overview.html#stack-renderers) like React DOM and React Native use it to efficiently update the user interface according to the React components written by the user. +*Reconciler* sendiri tidak memiliki publik API. [*Renderers*](/docs/codebase-overview.html#stack-renderers) seperti React DOM dan React Native menggunakannya untuk memperbarui antarmuka pengguna secara efisien sesuai dengan komponen React yang ditulis oleh pengguna. -### Mounting as a Recursive Process {#mounting-as-a-recursive-process} +### Mounting sebagai proses rekursif{#mounting-as-a-recursive-process} -Let's consider the first time you mount a component: +Mari kita pertimbangkan pertama kali anda pasang komponen: ```js ReactDOM.render(, rootEl); ``` -React DOM will pass `` along to the reconciler. Remember that `` is a React element, that is, a description of *what* to render. You can think about it as a plain object: +React DOM akan oper `` ke *reconciler*. Ingat bahwa `` adalah elemen React, yaitu, deskripsi *apa* yang akan di *render*. Anda dapat menganggapnya sebagai objek biasa: ```js console.log(); // { type: App, props: {} } ``` -The reconciler will check if `App` is a class or a function. +*Reconciler* akan memeriksa apakah `App` adalah kelas atau fungsi. +Jika `App` adalah fungsi, *reconciler* akan memanggil `App(props)` untuk mendapatkan elemen yang di *render*. -If `App` is a function, the reconciler will call `App(props)` to get the rendered element. +Jika `App` adalah kelas, *reconciler* akan *instantiate* sebuah `App` dengan `new App(props)`, panggil *method lifecycle* `componentWillMount()`, dan kemudian akan memanggil *method* `render()` untuk mendapatkan elemen yang di *render*. -If `App` is a class, the reconciler will instantiate an `App` with `new App(props)`, call the `componentWillMount()` lifecycle method, and then will call the `render()` method to get the rendered element. +Bagaimanapun juga, *reconciler* akan mempelajari elemen `App` *"rendered to"*. -Either way, the reconciler will learn the element `App` "rendered to". +Proses ini rekursif. `App` dapat di *render* menjadi ``, `Greeting` dapat di *render* menjadi `