-
Notifications
You must be signed in to change notification settings - Fork 264
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
docs: translate Choosing State Structure #502
Conversation
6aa566b
to
feddbe0
Compare
Size changes📦 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! 🙌 |
|
||
</YouWillLearn> | ||
|
||
## Principles for structuring state {/*principles-for-structuring-state*/} | ||
## Prinsip-prinsip untuk menstrukturkan *state*. {/*principles-for-structuring-state*/} |
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.
Not sure, tapi di sini sepertinya "menstrukturkan" bisa diterjemahkan dengan "menata"
## 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. |
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.
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. |
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.
Some changes requested. Make sure to take a look at @mazipan's review items.
ok. will update as soon as possible mas. thanks. |
sorry my bad. i forget to change github account T.T is it ok? |
any update mas? @resir014 |
Co-authored-by: Irfan Maulana <[email protected]>
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.
All good. Thanks!
Co-authored-by: IntanNanda <[email protected]> Co-authored-by: Irfan Maulana <[email protected]> Co-authored-by: Resi Respati <[email protected]>
Pages: https://react.dev/learn/choosing-the-state-structure
Closes: #380