Skip to content

Commit 62d30fc

Browse files
author
trung1308
committed
translate legacy-factory
1 parent 600768c commit 62d30fc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

content/warnings/legacy-factories.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ layout: single
44
permalink: warnings/legacy-factories.html
55
---
66

7-
You probably came here because your code is calling your component as a plain function call. This is now deprecated:
7+
Bạn có thể đã đến đây bởi vì đoạn mã của bạn đang gọi thành phần (component) như một cách gọi hàm đơn giản. Cách này bây giờ đã không còn sử dụng nữa:
88

99
```javascript
1010
var MyComponent = require('MyComponent');
@@ -16,7 +16,7 @@ function render() {
1616

1717
## JSX {#jsx}
1818

19-
React components can no longer be called directly like this. Instead [you can use JSX](/docs/jsx-in-depth.html).
19+
React components không còn được gọi một cách trực tiếp như vầy. Thay vào đó [bạn có thể sử dụng JSX](/docs/jsx-in-depth.html).
2020

2121
```javascript
2222
var React = require('react');
@@ -27,9 +27,9 @@ function render() {
2727
}
2828
```
2929

30-
## Without JSX {#without-jsx}
30+
## Không sử dụng JSX {#without-jsx}
3131

32-
If you don't want to, or can't use JSX, then you'll need to wrap your component in a factory before calling it:
32+
Nếu bạn không muốn, hoặc không thể sử dụng JSX, thì bạn sẽ cần bọc thành phần (component) của bạn trong một factory trước khi gọi nó:
3333

3434
```javascript
3535
var React = require('react');
@@ -40,11 +40,11 @@ function render() {
4040
}
4141
```
4242

43-
This is an easy upgrade path if you have a lot of existing function calls.
43+
Đây là một cách nâng cấp dễ dàng nếu bạn đã có nhiều lời gọi hàm (function call) tồn tại.
4444

45-
## Dynamic components without JSX {#dynamic-components-without-jsx}
45+
## Những thành phần động mà không có JSX {#dynamic-components-without-jsx}
4646

47-
If you get a component class from a dynamic source, then it might be unnecessary to create a factory that you immediately invoke. Instead you can just create your element inline:
47+
Nếu bạn lấy được một class component từ mã nguồn động, thì không cần thiết tạo một factory cái mà bạn thực hiện một cách tức thì. Thay vào đó, bạn chỉ cần tạo những phần tử nội tuyến:
4848

4949
```javascript
5050
var React = require('react');
@@ -54,6 +54,6 @@ function render(MyComponent) {
5454
}
5555
```
5656

57-
## In Depth {#in-depth}
57+
## Chuyên sâu {#in-depth}
5858

59-
[Read more about WHY we're making this change.](https://gist.github.com/sebmarkbage/d7bce729f38730399d28)
59+
[Đọc thêm về TẠI SAO chúng tôi thực hiện thay đổi này.](https://gist.github.com/sebmarkbage/d7bce729f38730399d28)

0 commit comments

Comments
 (0)