-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translation Handling-Events #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that Github's markdown support both _ and * to italicize, so I am just following your existing draft here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like just need to adjust several common terms and we're good to go 🎉
Co-Authored-By: TitusEfferian <kiritosato@gmail.com>
Co-Authored-By: TitusEfferian <kiritosato@gmail.com>
Co-Authored-By: TitusEfferian <kiritosato@gmail.com>
Co-Authored-By: TitusEfferian <kiritosato@gmail.com>
Co-Authored-By: TitusEfferian <kiritosato@gmail.com>
Co-Authored-By: TitusEfferian <kiritosato@gmail.com>
Co-Authored-By: TitusEfferian <kiritosato@gmail.com>
Co-Authored-By: TitusEfferian <kiritosato@gmail.com>
hello, kindly review once again |
content/docs/handling-events.md
Outdated
permalink: docs/handling-events.html | ||
prev: state-and-lifecycle.html | ||
next: conditional-rendering.html | ||
redirect_from: | ||
- "docs/events-ko-KR.html" | ||
--- | ||
|
||
Handling events with React elements is very similar to handling events on DOM elements. There are some syntactic differences: | ||
Menangani sebuah *events* dengan elemen React sangat mirip seperti menangani sebuah *events* pada elemen DOM. Ada beberapa perbedaan sintaks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sintaks
-> sintaksis
Lihat: https://kbbi.web.id/sintaksis
content/docs/handling-events.md
Outdated
* React events are named using camelCase, rather than lowercase. | ||
* With JSX you pass a function as the event handler, rather than a string. | ||
* *Events* pada React biasanya dituliskan dalam bentuk camelCase, dan bukan lowercase. | ||
* Dengan JSX Anda dapat oper sebuah *function* sebagai *event handler*, dan bukan sebuah *string*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tidak perlu tanda koma.
Lihat: http://www.indonesia.co.jp/bataone/ruangbahasa49.html
content/docs/handling-events.md
Outdated
@@ -54,19 +54,20 @@ function ActionLink() { | |||
} | |||
``` | |||
|
|||
Here, `e` is a synthetic event. React defines these synthetic events according to the [W3C spec](https://www.w3.org/TR/DOM-Level-3-Events/), so you don't need to worry about cross-browser compatibility. See the [`SyntheticEvent`](/docs/events.html) reference guide to learn more. | |||
Disini, `e` adalah sebuah event tiruan. React mendefinisikan event tiruan ini berdasarkan [W3C spec](https://www.w3.org/TR/DOM-Level-3-Events/), jadi Anda tidak perlu kuatir akan kesesuaian antar lintar browser. Lihat referensi pada [`SyntheticEvent`](/docs/events.html) untuk paduan belajar lebih jauh. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disini
-> Di sini
event
-> *event*
kuatir
-> khawatir
lintar
-> lintas
browser
-> peramban
atau *browser*
Lihat: https://kbbi.web.id/browser dan https://id.wikipedia.org/wiki/Daftar_istilah_Internet_Indonesia
paduan
-> panduan
content/docs/handling-events.md
Outdated
|
||
If calling `bind` annoys you, there are two ways you can get around this. If you are using the experimental [public class fields syntax](https://babeljs.io/docs/plugins/transform-class-properties/), you can use class fields to correctly bind callbacks: | ||
Jika memanggil `bind` menggangu Anda, ada dua cara untuk mengatasi ini. Jika Anda menggunakan sintaks eksperimental [public class fields](https://babeljs.io/docs/plugins/transform-class-properties/), Anda dapat menggunakan *class fields* untuk melakukan *binding* terhadap *callbacks*: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sintaks
-> sintaksis
content/docs/handling-events.md
Outdated
|
||
```js{2-6} | ||
class LoggingButton extends React.Component { | ||
// This syntax ensures `this` is bound within handleClick. | ||
// Warning: this is *experimental* syntax. | ||
// Sintaks ini memastikan `this` telah terikat dalam handleClick. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sintaks
-> sintaksis
content/docs/handling-events.md
Outdated
@@ -117,9 +118,9 @@ class LoggingButton extends React.Component { | |||
} | |||
``` | |||
|
|||
This syntax is enabled by default in [Create React App](https://github.com/facebookincubator/create-react-app). | |||
sintaks ini telah diakfifkan secara bawaan pada [Create React App](https://github.com/facebookincubator/create-react-app). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sintaks
-> Sintaksis
content/docs/handling-events.md
Outdated
|
||
## Passing Arguments to Event Handlers {#passing-arguments-to-event-handlers} | ||
## Mengoper Argumen Kedalam Penanganan Event {#passing-arguments-to-event-handlers} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kedalam
-> ke dalam
Lihat: https://beritagar.id/artikel/tabik/kapitalisasi-judul dan https://id.wikipedia.org/wiki/Kata_tugas
content/docs/handling-events.md
Outdated
permalink: docs/handling-events.html | ||
prev: state-and-lifecycle.html | ||
next: conditional-rendering.html | ||
redirect_from: | ||
- "docs/events-ko-KR.html" | ||
--- | ||
|
||
Handling events with React elements is very similar to handling events on DOM elements. There are some syntactic differences: | ||
Menangani *events* dengan elemen React sangat mirip seperti menangani sebuah *events* pada elemen DOM. Ada beberapa perbedaan sintaks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sintaks
-> sintaksis
content/docs/handling-events.md
Outdated
|
||
If calling `bind` annoys you, there are two ways you can get around this. If you are using the experimental [public class fields syntax](https://babeljs.io/docs/plugins/transform-class-properties/), you can use class fields to correctly bind callbacks: | ||
Jika Anda tidak terbiasa menggunakan `bind`, ada dua cara untuk mengatasi ini. Jika Anda menggunakan sintaks eksperimental [public class fields](https://babeljs.io/docs/plugins/transform-class-properties/), Anda dapat menggunakan *class fields* untuk melakukan *binding* terhadap *callbacks*: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sintaks
-> sintaksis
content/docs/handling-events.md
Outdated
</button> | ||
); | ||
} | ||
} | ||
``` | ||
|
||
This syntax is enabled by default in [Create React App](https://github.com/facebookincubator/create-react-app). | ||
Sintaks ini telah diakfifkan secara bawaan pada [Create React App](https://github.com/facebookincubator/create-react-app). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sintaks
-> sintaksis
content/docs/handling-events.md
Outdated
|
||
If you aren't using class fields syntax, you can use an [arrow function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions) in the callback: | ||
Jika Anda tidak menggunakan sintaks *class fields*, Anda dapat menggunakan [arrow function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions) pada *callback*: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sintaks
-> sintaksis
content/docs/handling-events.md
Outdated
@@ -128,27 +129,27 @@ class LoggingButton extends React.Component { | |||
} | |||
|
|||
render() { | |||
// This syntax ensures `this` is bound within handleClick | |||
// Sintaks ini memastikan `this` telah terikat dalam handleClick. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sintaks
-> sintaksis
content/docs/handling-events.md
Outdated
</button> | ||
); | ||
} | ||
} | ||
``` | ||
|
||
The problem with this syntax is that a different callback is created each time the `LoggingButton` renders. In most cases, this is fine. However, if this callback is passed as a prop to lower components, those components might do an extra re-rendering. We generally recommend binding in the constructor or using the class fields syntax, to avoid this sort of performance problem. | ||
Masalah pada sintaks tersebut adalah *callback* yang berbeda dibuat setiap kali `LoggingButton` di-*render*. Dalam banyak kasus, hal ini tidak masalah. Akan tetapi, jika callback tersebut mengoperkan sebagai *props* kepada komponen yang lebih rendah, maka komponen tersebut mungkin akan melakukan ekstra *render* ulang. Kita umumnya merekomendasikan *binding* dilakukan pada *constructor* atau menggunakan sintaks *class fields*, untuk menghindari masalah kinerja seperti ini. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sintaks
-> sintaksis
Deploy preview for idreactjs ready! Built with commit 5e07a5b |
@arfianadam already resolved based on your request change |
LGTM from me 😄 Thank you for the contribution! |
Deploy preview for id-reactjs ready! Built with commit 5e07a5b |
any updates about this PR? |
So sorry, looks like from both @arfianadam and @gedeagas it's LGTM, will merge now mas @TitusEfferian Thanks for the contribution! 🎉 |
No description provided.