` ອີກໃນ markup ຂອງທ່ານ, ທ່ານສາມາດຂຽນ `<>` ແລະ `>` ແທນ:
```js {1,11}
<>
-
Hedy Lamarr's Todos
+
Todos ຂອງ Hedy Lamarr

` to your markup, you can write `<>` and
>
```
-This empty tag is called a *[Fragment.](/reference/react/Fragment)* Fragments let you group things without leaving any trace in the browser HTML tree.
+tag ເປົ່າວ່າງນີ້ເອີ້ນວ່າ *[Fragment.](/reference/react/Fragment)* Fragment ຊ່ວຍໃຫ້ທ່ານລວມສິ່ງຕ່າງໆໂດຍບໍ່ສະແດງຫຍັງໃນ browser tree ຂອງ HTML.
-#### Why do multiple JSX tags need to be wrapped? {/*why-do-multiple-jsx-tags-need-to-be-wrapped*/}
+#### ເປັນຫຍັງຫຼາຍ tags JSX ເຖິງຕ້ອງການລວມ? {/*why-do-multiple-jsx-tags-need-to-be-wrapped*/}
-JSX looks like HTML, but under the hood it is transformed into plain JavaScript objects. You can't return two objects from a function without wrapping them into an array. This explains why you also can't return two JSX tags without wrapping them into another tag or a Fragment.
+JSX ຄ້າຍຄື HTML, ແຕ່ເບື້ອງຫຼັງແມ່ນຈະຖືກປ່ຽນມາເປັນ object JavaScript ທຳມະດາ. ທ່ານບໍ່ສາມາດ return 2 object ຈາກຟັງຊັ່ນໂດຍບໍ່ລວມມັນຢູ່ array. ນີ້ອະທິບາຍວ່າເປັນຫຍັງທ່ານຈິງບໍ່ສາມາດ return 2 tag JSX ໂດຍບໍ່ລວມມັນເປັນ tag ອື່ນ ຫຼື Fragment.
-### 2. Close all the tags {/*2-close-all-the-tags*/}
+### 2. ປິດ tags ທັງໝົດ {/*2-close-all-the-tags*/}
-JSX requires tags to be explicitly closed: self-closing tags like `
![]()
` must become `
![]()
`, and wrapping tags like `
oranges` must be written as `oranges`.
+JSX ກຳນົດໃຫ້ tag ຕ້ອງປິດເທົ່ານັ້ນ: tag ທີ່ປິດດ້ວຍຕົວເອງເຊັ່ນ `
![]()
` ຕ້ອງເປັນ `
![]()
`, ແລະ ລວມ tag ເຊັ່ນ `
ໝາກກ້ຽງ` ຕ້ອງຖືກຂຽນແບບນີ້ `ໝາກກ້ຽງ`.
-This is how Hedy Lamarr's image and list items look closed:
+ນີ້ແມ່ນວິທີປິດ ຮູບ ແລະ list items ຂອງ Hedy Lamarr:
```js {2-6,8-10}
<>
@@ -193,18 +193,18 @@ This is how Hedy Lamarr's image and list items look closed:
class="photo"
/>
- - Invent new traffic lights
- - Rehearse a movie scene
- - Improve the spectrum technology
+ - ປະດິດສັນຍານໄຟຈາລະຈອນໃໝ່
+ - ຊ້ອມສາກຮູບເງົາ
+ - ປັບປຸງເຕັກໂນໂລຊີ spectrum
>
```
-### 3. camelCase
all most of the things! {/*3-camelcase-salls-most-of-the-things*/}
+### 3. camelCase
ເກືອບ ທຸກຢ່າງ! {/*3-camelcase-salls-most-of-the-things*/}
-JSX turns into JavaScript and attributes written in JSX become keys of JavaScript objects. In your own components, you will often want to read those attributes into variables. But JavaScript has limitations on variable names. For example, their names can't contain dashes or be reserved words like `class`.
+JSX ປ່ຽນເປັນ JavaScript ແລະ attribute ທີ່ຂຽນດ້ວຍ JavScript ກາຍເປັນ key ຂອງ object JavaScript. ໃນ component ຂອງທ່ານ, ທ່ານຢາກຈະອ່ານ attribute ເຫຼົ່ານັ້ນເປັນຕົວແປຢູ່ສະເໝີ. ແຕ່ JavaScript ມີຂໍ້ຈຳກັດສຳລັບຊື່ຕົວແປ. ຕົວຢ່າງ, ຊື່ມັນບໍ່ສາມາດປະກອບມີເຄື່ອງໝາຍຂີດຕໍ່ ຫຼື ຊື່ທີສະຫງວນໄວ້ ເຊັ່ນ `class`.
-This is why, in React, many HTML and SVG attributes are written in camelCase. For example, instead of `stroke-width` you use `strokeWidth`. Since `class` is a reserved word, in React you write `className` instead, named after the [corresponding DOM property](https://developer.mozilla.org/en-US/docs/Web/API/Element/className):
+ນີ້ແມ່ນເຫດຜົນວ່າເປັນຫຍັງ, ໃນ React, ຫຼາຍ attribute HTML ແລະ SVG ຖືກຂຽນເປັນແບບ camelCase. ຕົວຢ່າງ, ແທນທີ່ `stroke-width` ທ່ານໃຊ້ `strokeWidth`. ນັບແຕ່ `class` ຖືກສະຫງວນ, ໃນ React ທ່ານຂຽນ `className` ແທນ, ຊື່ຫຼັງຈາກ [DOM property ທີ່ກ່ຽວຂ້ອງ](https://developer.mozilla.org/en-US/docs/Web/API/Element/className):
```js {4}
![]()
```
-You can [find all these attributes in the list of DOM component props.](/reference/react-dom/components/common) If you get one wrong, don't worry—React will print a message with a possible correction to the [browser console.](https://developer.mozilla.org/docs/Tools/Browser_Console)
+ທ່ານສາມາດ [ຄົ້ນຫາ attribute ເຫຼົ່ານີ້ໃນ list ຂອງ DOM component props.](/reference/react-dom/components/common) ຖ້າທ່ານເຂົ້າໃຈອັນໃດອັນໜຶ່ງຜິດ, ບໍ່ຕ້ອງຢ້ານ-React ຈະສະແດງຂໍ້ຄວາມພ້ອມກັບສິ່ງທີ່ຈະເປັນໄປໄດ້ໃນ [browser console.](https://developer.mozilla.org/docs/Tools/Browser_Console)
-For historical reasons, [`aria-*`](https://developer.mozilla.org/docs/Web/Accessibility/ARIA) and [`data-*`](https://developer.mozilla.org/docs/Learn/HTML/Howto/Use_data_attributes) attributes are written as in HTML with dashes.
+ສຳລັບເຫດຜົນທາງປະຫວັດສາດ, [`aria-*`](https://developer.mozilla.org/docs/Web/Accessibility/ARIA) ແລະ [`data-*`](https://developer.mozilla.org/docs/Learn/HTML/Howto/Use_data_attributes) attribute ແມ່ນຖືກຂຽນໃນ HTML ດ້ວຍເຄື່ອງໝາຍຂີດຕໍ່.
-### Pro-tip: Use a JSX Converter {/*pro-tip-use-a-jsx-converter*/}
+### Pro-tip: ໃຊ້ JSX Converter {/*pro-tip-use-a-jsx-converter*/}
-Converting all these attributes in existing markup can be tedious! We recommend using a [converter](https://transform.tools/html-to-jsx) to translate your existing HTML and SVG to JSX. Converters are very useful in practice, but it's still worth understanding what is going on so that you can comfortably write JSX on your own.
+ການແປງ attribute ທັງໝົດໃນ markup ທີ່ມີຢູ່ອາດເປັນເລື່ອງທີ່ນ່າເບື່ອ! ພວກເຮົາແນະນຳໃຊ້ [converter](https://transform.tools/html-to-jsx) ເພື່ອແປງ HTML ແລະ SVG ທີ່ມີຢູ່ແລ້ວຂອງທ່ານເປັນ JSX. Converters ແມ່ນມີປະໂຫຍດຫຼາຍໃນທາງປະຕິບັດ, ແຕ່ກໍຍັງຄຸ້ມຄ່າທີ່ຈະທຳຄວາມເຂົ້າໃຈກັບສິ່ງທີ່ເກີດຂຶ້ນ ເພື່ອໃຫ້ທ່ານສາມາດຂຽນ JSX ດ້ວຍຕົນເອງຢ່າງສະບາຍໃຈ.
-Here is your final result:
+ນີ້ແມ່ນຜົນລັບສຸດທ້າຍຂອງທ່ານ:
@@ -234,16 +234,16 @@ Here is your final result:
export default function TodoList() {
return (
<>
- Hedy Lamarr's Todos
+ Todos ຂອງ Hedy Lamarr
- - Invent new traffic lights
- - Rehearse a movie scene
- - Improve the spectrum technology
+ - ປະດິດສັນຍານໄຟຈາລະຈອນໃໝ່
+ - ຊ້ອມສາກຮູບເງົາ
+ - ປັບປຸງເຕັກໂນໂລຊີ spectrum
>
);
@@ -258,11 +258,11 @@ img { height: 90px }
-Now you know why JSX exists and how to use it in components:
+ຕອນນີ້ທ່ານຮູ້ແລ້ວວ່າເປັນຫຍັງຈື່ງມີ JSX ແລະ ວິທີການໃຊ້ມັນໃນ component:
-* React components group rendering logic together with markup because they are related.
-* JSX is similar to HTML, with a few differences. You can use a [converter](https://transform.tools/html-to-jsx) if you need to.
-* Error messages will often point you in the right direction to fixing your markup.
+* Logic ການສະແດງຜົນກຸ່ມ component ພ້ອມກັບ markup ເພາະວ່າມັນກ່ຽວຂ້ອງກັນ.
+* JSX ຄ້າຍກັບ HTML, ແຕ່ມີຄວາມແຕກຕ່າງກັນໜ້ອຍໜຶ່ງ. ທ່ານສາມາດໃຊ້ [converter](https://transform.tools/html-to-jsx) ຖ້າທ່ານຕ້ອງການ.
+* ຂໍ້ຄວາມສະແດງຂໍ້ຜິດພາດສ່ວນຫຼາຍຈະແນະນຳທ່ານໄປໃນທາງທີ່ຖືກຕ້ອງເພື່ອແກ້ໄຂ markup ຂອງທ່ານ.
@@ -270,9 +270,9 @@ Now you know why JSX exists and how to use it in components:
-#### Convert some HTML to JSX {/*convert-some-html-to-jsx*/}
+#### ແປງບາງ HTML ເປັນ JSX {/*convert-some-html-to-jsx*/}
-This HTML was pasted into a component, but it's not valid JSX. Fix it:
+HTML ນີ້ຖືກ paste ເປັນ component, ແຕ່ບໍ່ແມ່ນ JSX ທີ່ຖືກຕ້ອງ. ແກ້ມັນ:
@@ -280,12 +280,12 @@ This HTML was pasted into a component, but it's not valid JSX. Fix it:
export default function Bio() {
return (
-
Welcome to my website!
+ ຍິນດີຕ້ອນຮັບສູ່ເວັບໄຊຂອງຂ້ອຍ
- You can find my thoughts here.
+ ທ່ານສາມາດຄົ້ນຫາຄວາມຄິດຂ້ອຍໄດ້ບ່ອນນີ້
- And pictures of scientists!
+ ແລະ ຮູບ ຂອງນັກວິທະຍາສາດ!
);
}
@@ -308,7 +308,7 @@ export default function Bio() {
-Whether to do it by hand or using the converter is up to you!
+ບໍ່ວ່າຈະເຮັດດ້ວຍຕົນເອງ ຫຼື ໃຊ້ converter ແມ່ນຂຶ້ນກັບໂຕທ່ານ!
@@ -319,10 +319,10 @@ export default function Bio() {
return (
-
Welcome to my website!
+ ຍິນດີຕ້ອນຮັບສູ່ເວັບໄຊຂອງຂ້ອຍ
- You can find my thoughts here.
+ ທ່ານສາມາດຄົ້ນຫາຄວາມຄິດຂ້ອຍໄດ້ບ່ອນນີ້
And pictures of scientists!