Skip to content

docs: translate Choosing State Structure #502

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

Merged

Conversation

dzakiafif
Copy link
Contributor

@github-actions
Copy link

github-actions bot commented May 7, 2023

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@r17x r17x requested a review from mhaidarhanif May 7, 2023 20:24

</YouWillLearn>

## Principles for structuring state {/*principles-for-structuring-state*/}
## Prinsip-prinsip untuk menstrukturkan *state*. {/*principles-for-structuring-state*/}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@resir014 resir014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes requested. Make sure to take a look at @mazipan's review items.

@dzakiafif
Copy link
Contributor Author

Some changes requested. Make sure to take a look at @mazipan's review items.

ok. will update as soon as possible mas. thanks.

@dzakiafif
Copy link
Contributor Author

sorry my bad. i forget to change github account T.T is it ok?

@dzakiafif dzakiafif requested a review from resir014 May 14, 2023 12:49
@dzakiafif
Copy link
Contributor Author

any update mas? @resir014

Copy link
Member

@resir014 resir014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good. Thanks!

@resir014 resir014 changed the title Docs: Translate Choosing state structure docs: translate Choosing State Structure Jun 3, 2023
@resir014 resir014 merged commit 185e575 into reactjs:main Jun 4, 2023
FelixFern pushed a commit to FelixFern/id.react.dev that referenced this pull request Jun 13, 2023
Co-authored-by: IntanNanda <[email protected]>
Co-authored-by: Irfan Maulana <[email protected]>
Co-authored-by: Resi Respati <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Choosing the State Structure
5 participants