Skip to content

Translate: integrating-with-other-libraries page #222

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

ncnthien
Copy link
Contributor

Translate the integrating-with-other-libraries page in the advanced guides section of the documentation.

@netlify
Copy link

netlify bot commented Sep 17, 2021

✔️ Deploy Preview for vi-reactjs-org ready!

🔨 Explore the source changes: ee31e2f

🔍 Inspect the deploy log: https://app.netlify.com/sites/vi-reactjs-org/deploys/6146f7aab50946000719e9b9

😎 Browse the preview: https://deploy-preview-222--vi-reactjs-org.netlify.app

@Ryan-LT Ryan-LT mentioned this pull request Sep 18, 2021
95 tasks
Copy link
Member

@Ryan-LT Ryan-LT left a comment

Choose a reason for hiding this comment

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

Em cố gắng dịch theo ngôn ngữ tự nhiên chút nhé, anh sợ mấy bạn mới đọc sẽ khó hiểu đấy

@ncnthien
Copy link
Contributor Author

Em cố gắng dịch theo ngôn ngữ tự nhiên chút nhé, anh sợ mấy bạn mới đọc sẽ khó hiểu đấy

Anh góp ý giúp em một vài chỗ được không ạ, tại vì đây là lần đầu em dịch cũng như contribute cho một dự án cộng đồng như thế này nên chưa có nhiều kinh nghiệm, mong anh giúp đỡ ạ ^^

@ncnthien
Copy link
Contributor Author

Em vừa mới dịch lại theo cách thoáng ra hơn một chút, anh rảnh thì xem lại giúp em rồi cho em ý kiến a

@ncnthien ncnthien requested a review from Ryan-LT September 18, 2021 07:34

This does not mean it is impossible or even necessarily difficult to combine React with other ways of affecting the DOM, you just have to be mindful of what each is doing.
Điều này không có nghĩa là không thể hoặc rất khó để kết hợp React với những cách thao tác DOM khác, bạn chỉ cần chú ý mỗi phần riêng biệt sẽ làm gì.
Copy link
Member

Choose a reason for hiding this comment

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

Đoạn này còn hơi mơ hồ, em kiểm tra lại nhé!


For a more concrete example of these concepts, let's write a minimal wrapper for the plugin [Chosen](https://harvesthq.github.io/chosen/), which augments `<select>` inputs.
Để có một ví dụ rõ ràng hơn cho những ý tưởng này, hãy làm một wrapper nho nhỏ cho plugin [Chosen](https://harvesthq.github.io/chosen/), một plugin hỗ trợ input `<select>`.
Copy link
Member

Choose a reason for hiding this comment

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

concepts là khái niệm em nhé

>
>Just because it's possible, doesn't mean that it's the best approach for React apps. We encourage you to use React components when you can. React components are easier to reuse in React applications, and often provide more control over their behavior and appearance.
>Chỉ vì có thể, không có nghĩa rằng đó là cách tiếp cận tốt nhất của các ứng dụng React. Chúng tôi khuyến khích bạn sử dụng các component React khi có thể. Các component React dễ dàng được tái sử dụng hơn trong các ứng dụng React, và thường cung cấp nhiều hơn các khả năng điều khiển hành động và hiển thị của component đó.
Copy link
Member

Choose a reason for hiding this comment

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

Just because it's possible...

Vì nó khả thi, không có nghĩa rằng nó là cách tiếp cận tốt nhất cho các app React.


```js
<select className="Chosen-select" ref={el => this.el = el}>
```

This is enough to get our component to render, but we also want to be notified about the value changes. To do this, we will subscribe to the jQuery `change` event on the `<select>` managed by Chosen.
Chừng này là đủ để cho component của chúng ta render, nhưng nếu chúng ta cũng muốn được thông báo về sự thay đổi của giá trị thì sao. Để làm việc này, chúng ta sẽ theo dõi sự kiện `change` của jQuery trên `<select>` - thẻ được quản lý bởi Chosen.
Copy link
Member

Choose a reason for hiding this comment

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

Great!

@@ -399,7 +399,7 @@ function connectToBackboneModel(WrappedComponent) {
}
```

To demonstrate how to use it, we will connect a `NameInput` React component to a Backbone model, and update its `firstName` attribute every time the input changes:
Để chứng mình làm sao sử dụng nó, chúng ta sẽ connect một component `NameInput` đến một Backbone model, update attribute `firstName` của nó mỗi khi input thay đổi:
Copy link
Member

Choose a reason for hiding this comment

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

Để chứng mình

"Chứng minh" em nhé

Copy link
Member

@Ryan-LT Ryan-LT left a comment

Choose a reason for hiding this comment

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

Great effort! 🍰

@Ryan-LT Ryan-LT merged commit 65f61c7 into reactjs:main Sep 20, 2021
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