-
Notifications
You must be signed in to change notification settings - Fork 266
doc: translation src/content/learn/synchronizing-with-effects.md #576
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rfdzan
commented
Jun 8, 2023
| Terkadang ini tidak cukup. Sebutlah sebuah komponen `ChatRoom` yang harus terkoneksi dengan peladen obrolan setiap kali komponen ini tampil di layar. Penyambungan ke peladen tidak murni perhitungan (ini adalah efek samping) sehingga tidak dapat terjadi saat pe-*render*an. Namun, tidak ada sebuah *event* tertentu seperti sebuah klik yang menampilkan `ChatRoom`. | ||
|
|
||
| ***Effects* let you specify side effects that are caused by rendering itself, rather than by a particular event.** Sending a message in the chat is an *event* because it is directly caused by the user clicking a specific button. However, setting up a server connection is an *Effect* because it should happen no matter which interaction caused the component to appear. Effects run at the end of a [commit](/learn/render-and-commit) after the screen updates. This is a good time to synchronize the React components with some external system (like network or a third-party library). | ||
| ***Effect* memungkinkan anda untuk menentukan efek samping yang bukan disebabkan oleh *event*, melainkan oleh per-*render*-an itu sendiri.** Mengirimkan pesan dalam obrolan adalah tindakan yang disebabkan oleh pengguna menekan tombol tertentu. Oleh karena itu, hal ini adalah sebuah *event*. Namun, penyetelan koneksi ke peladen adalah sebuah *Effect* karena koneksi tersebut tetap harus terjadi terlepas dari interaksi yang menyebabkan komponen tersebut tampil. Effect berjalan di akhir sebuah [*commit*](/learn/render-and-commit) setelah layar diperbarui. Ini adalah waktu yang tepat untuk menyinkronkan komponen React dengan suatu sistem eksternal (seperti jaringan atau *library* pihak ketiga). |
Contributor
Author
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.
note to self
- Kalimat 1: "...per-render-an..." -> "...pe-render-an..." (typo)
rfdzan
commented
Jun 8, 2023
| <Note> | ||
|
|
||
| Here and later in this text, capitalized "Effect" refers to the React-specific definition above, i.e. a side effect caused by rendering. To refer to the broader programming concept, we'll say "side effect". | ||
| Mulai dari sini dan seterusnya, kata "Effect" kapital merujuk pada definisi "Effect" dalam React, yakni efek samping yang disebabkan oleh pe-*render*-an. Saat merujuk pada konsep pemrograman, kami akan menyebut "efek samping". |
Contributor
Author
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.
note to self
- Kalimat 1: "...seterusnya,..." -> "..seterusnya..." (hilangkan koma)
Member
|
Superseded with #655. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #389
Description
Translate the src/content/learn/synchronizing-with-effects.md page.
Page URL: https://id.react.dev/learn/synchronizing-with-effects