docs: translate Choosing State Structure#502
Merged
resir014 merged 6 commits intoreactjs:mainfrom Jun 4, 2023
Merged
Conversation
r17x
approved these changes
May 7, 2023
6aa566b to
feddbe0
Compare
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
mazipan
reviewed
May 8, 2023
| </YouWillLearn> | ||
|
|
||
| ## Principles for structuring state {/*principles-for-structuring-state*/} | ||
| ## Prinsip-prinsip untuk menstrukturkan *state*. {/*principles-for-structuring-state*/} |
Collaborator
There was a problem hiding this comment.
Not sure, tapi di sini sepertinya "menstrukturkan" bisa diterjemahkan dengan "menata"
Suggested change
| ## Prinsip-prinsip untuk menstrukturkan *state*. {/*principles-for-structuring-state*/} | |
| ## Prinsip-prinsip untuk menata *state*. {/*principles-for-structuring-state*/} |
| 2. **Hindari kontradiksi dalam *state*.** Saat *state* diorganisir sedemikian rupa sehingga beberapa bagian *state* dapat saling bertentangan dan "tidak sependapat" satu sama lain, maka ini bisa meninggalkan celah untuk kesalahan. Coba hindari hal ini. | ||
| 3. **Hindari *state* yang redundan.** Jika Anda dapat menghitung beberapa informasi dari *prop* komponen atau variabel *state* yang sudah ada selama *rendering*, maka Anda tidak perlu memasukkan informasi tersebut ke dalam *state* komponen tersebut. | ||
| 4. **Hindari duplikasi dalam *state*.** Ketika data yang sama terduplikasi antara beberapa variabel *state*, atau dalam objek bertingkat, maka akan sulit menjaga sinkronisasi antara mereka. Kurangi duplikasi ketika memungkinkan. | ||
| 5. **Hindari *state* yang sangat bertingkat.** *State* yang sangat hierarkis tidak sangat mudah untuk diperbarui. Ketika memungkinkan, lebih baik struktur *state* secara datar. |
Collaborator
There was a problem hiding this comment.
Suggested change
| 5. **Hindari *state* yang sangat bertingkat.** *State* yang sangat hierarkis tidak sangat mudah untuk diperbarui. Ketika memungkinkan, lebih baik struktur *state* secara datar. | |
| 5. **Hindari *state* yang sangat bertingkat.** *State* dengan hierarkis yang dalam sangat tidak mudah untuk diperbarui. Saat memungkinkan, lebih baik menata *state* dengan datar. |
Contributor
Author
ok. will update as soon as possible mas. thanks. |
Contributor
Author
|
sorry my bad. i forget to change github account T.T is it ok? |
Contributor
Author
|
any update mas? @resir014 |
mazipan
reviewed
May 25, 2023
mazipan
reviewed
May 31, 2023
mazipan
reviewed
May 31, 2023
mazipan
approved these changes
May 31, 2023
resir014
reviewed
Jun 3, 2023
Co-authored-by: Irfan Maulana <mazipanneh@gmail.com>
FelixFern
pushed a commit
to FelixFern/id.react.dev
that referenced
this pull request
Jun 13, 2023
Co-authored-by: IntanNanda <intan.irnanda@sera.astra.co.id> Co-authored-by: Irfan Maulana <mazipanneh@gmail.com> Co-authored-by: Resi Respati <resir014@gmail.com>
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
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.
Pages: https://react.dev/learn/choosing-the-state-structure
Closes: #380