Skip to content
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

Translate higher order components #158

Merged
merged 3 commits into from
Mar 4, 2020

Conversation

andriawan
Copy link
Contributor

Dear maintainers,

Please review this translation. I have several concerns about some term which i am confused to translate. They are:

  • Subscribe
  • data source
  • Wrapped component
  • inheritance
  • container
  • Children

Please help me solve that @resir014 @regalius

@netlify
Copy link

netlify bot commented Feb 15, 2020

Deploy preview for idreactjs ready!

Built with commit 5561fcc

https://deploy-preview-158--idreactjs.netlify.com

@netlify
Copy link

netlify bot commented Feb 15, 2020

Deploy preview for id-reactjs ready!

Built with commit 5561fcc

https://deploy-preview-158--id-reactjs.netlify.com

@resir014
Copy link
Member

@andriawan

  • Children: let's keep it as children.
  • Subscription can be translated to "langganan" or any variations of it.
  • Data source: can be translated to "sumber data", unless part of a code (e.g. SumberData)
  • Wrapped component: feel free to translate where possible, otherwise fallback to wrapped component
  • Inheritance: keep it (inheritance)
  • Container: keep it (container)

@andriawan
Copy link
Contributor Author

thanks for the feedback @resir014...i will re-review my work based on your suggestion above

@andriawan andriawan force-pushed the andriawan-hoc-translate branch from 1499224 to 8ff8a1c Compare February 28, 2020 14:30
@andriawan andriawan force-pushed the andriawan-hoc-translate branch from 4f10c8f to 6641476 Compare March 1, 2020 09:21
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.

@andriawan Just a few changes and it's good to go:


React's diffing algorithm (called reconciliation) uses component identity to determine whether it should update the existing subtree or throw it away and mount a new one. If the component returned from `render` is identical (`===`) to the component from the previous render, React recursively updates the subtree by diffing it with the new one. If they're not equal, the previous subtree is unmounted completely.
Algoritma _React's diffing_ (disebut _reconciliation_) menggunakan identitas komponen untuk menentukan apakah subtree yang ada perlu diperbarui atau _mount_ yang baru. Jika komponen yang dikembalikan dari `render` sama (`===`) dengan _render_ komponen sebelumnya, React memperbarui subtree secara rekursif dengan membandingkan dengan yang baru. Jika tidak sama, subtree sebelumnya akan diganti seluruhnya.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Algoritma _React's diffing_ (disebut _reconciliation_) menggunakan identitas komponen untuk menentukan apakah subtree yang ada perlu diperbarui atau _mount_ yang baru. Jika komponen yang dikembalikan dari `render` sama (`===`) dengan _render_ komponen sebelumnya, React memperbarui subtree secara rekursif dengan membandingkan dengan yang baru. Jika tidak sama, subtree sebelumnya akan diganti seluruhnya.
Algoritma _diffing_ React (disebut _reconciliation_) menggunakan identitas komponen untuk menentukan apakah subtree yang ada perlu diperbarui atau _mount_ yang baru. Jika komponen yang dikembalikan dari `render` sama (`===`) dengan _render_ komponen sebelumnya, React memperbarui subtree secara rekursif dengan membandingkan dengan yang baru. Jika tidak sama, subtree sebelumnya akan diganti seluruhnya.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it...i'll fix it


```js
const EnhancedComponent = higherOrderComponent(WrappedComponent);
```

Whereas a component transforms props into UI, a higher-order component transforms a component into another component.
Sebaliknya saat sebuah komponen mengubah _props_ menjadi antar muka pengguna (UI), _higher-order component_ mengubah sebuah komponen menjadi komponen yang lainnya.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Sebaliknya saat sebuah komponen mengubah _props_ menjadi antar muka pengguna (UI), _higher-order component_ mengubah sebuah komponen menjadi komponen yang lainnya.
Sebaliknya saat sebuah komponen mengubah _props_ menjadi antarmuka pengguna (UI), _higher-order component_ mengubah sebuah komponen menjadi komponen yang lainnya.

"antarmuka" - digabung.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay, thanks for the feedback

- antar muka to antarmuka anda
-  Algoritma React's diffing to Algoritma diffing React
@andriawan
Copy link
Contributor Author

please check again @resir014, i have made several change based on your suggestion

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 for your help!

@resir014 resir014 merged commit 820c30e into reactjs:master Mar 4, 2020
@andriawan andriawan deleted the andriawan-hoc-translate branch May 10, 2023 06:27
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.

2 participants