Skip to content

Commit efda5e4

Browse files
authored
Merge pull request #58 from reactjs/sync-af54fc87
Sync with react.dev @ af54fc8
2 parents ab8ae53 + 1c5d418 commit efda5e4

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

src/content/learn/conditional-rendering.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,11 @@ export default function PackingList() {
626626
627627
ສັງເກດທ່ານຕ້ອງຂຽນ `importance > 0 && ...` ແທນທີ່ຈະເປັນ `importance && ...` ສະນັ້ນຫາກ `importance` ເປັນ `0`, ຜົນລັບຈະບໍ່ສະແດງ `0`!
628628
629+
<<<<<<< HEAD
629630
ໃນວິທີການນີ້, ຈະໃຊ້ເງື່ອນໄຂສອງເງື່ອນໄຂແຍກກັນເພື່ອໃສ່ຊ່ອງວ່າງລະຫວ່າງຊື່ ແລະ label. ອີກວິທີໜຶ່ງ, ທ່ານສາມາດໃຊ້ fragment ທີ່ມີຊ່ອງວ່າງນຳໜ້າ: `importance > 0 && <> <i>...</i></>` ຫຼື ເພີ່ມຊ່ອງວ່າງພາຍໃນ `importance > 0 && <> <i>...</i></>`.
631+
=======
632+
In this solution, two separate conditions are used to insert a space between the name and the importance label. Alternatively, you could use a Fragment with a leading space: `importance > 0 && <> <i>...</i></>` or add a space immediately inside the `<i>`: `importance > 0 && <i> ...</i>`.
633+
>>>>>>> af54fc873819892f6050340df236f33a18ba5fb8
630634
631635
632636
</Solution>

src/content/learn/rendering-lists.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,7 @@ hr {
11501150

11511151

11521152

1153+
11531154
</Hint>
11541155

11551156
<Solution>
@@ -1211,9 +1212,11 @@ hr {
12111212

12121213
ການໃຊ້ index ແຖວເກົ່າເປັນ `key` ບໍ່ເຮັດວຽກອີກຕໍ່ໄປເພາະວ່າແຕ່ລະໂຕຂັ້ນ ແລະ ຫຍໍ້ໜ້າແຕ່ລະໂຕຢູ່ໃນ array ດຽວກັນ. ເຖິງຢ່າງໃດກໍຕາມ, ທ່ານສາມາດກຳນົດ key ທີ່ແຕກຕ່າງກັນໃຫ້ແຕ່ລະລາຍການໄດ້ໂດຍໃຊ້ຄຳຕໍ່ທ້າຍເຊັ່ນ `key={i + '-text'}`.
12131214

1215+
12141216
ອີກວິທີໜຶ່ງ, ທ່ານສາມາດສະແດງຜົນ collection ຂອງ fragment ທີ່ປະກອບມີ `<hr />` and `<p>...</p>`. ເຖິງຢ່າງໃດກໍຕາມ, syntax `<>...</>` ບໍ່ຮອງຮັບການສົ່ງຜ່ານ key, ດັ່ງນັ້ນທ່ານຕ້ອງໄດ້ຂຽນ `<Fragment>` ຢ່າງຊັດເຈນ:
12151217

12161218

1219+
12171220
<Sandpack>
12181221

12191222
```js
@@ -1258,10 +1261,10 @@ hr {
12581261

12591262
</Sandpack>
12601263

1261-
12621264
ຈື່ໄວ້ວ່າ, fragment (ມັກຂຽນເປັນ `<> </>`) ໃຫ້ທ່ານ group JSX node ໂດຍບໍ່ຕ້ອງເພີ່ມ `<div>`!
12631265

12641266

1267+
12651268
</Solution>
12661269

12671270
</Challenges>

src/content/learn/start-a-new-react-project.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,11 @@ title: ເລີ່ມ Project React ໃໝ່
2424
npx create-next-app@latest
2525
</TerminalBlock>
2626

27-
<<<<<<< HEAD
2827
ຖ້າທ່ານຍັງໃໝ່ສຳລັບ Next.js, ເບິ່ງ [ຄູ່ມື Next.js .](https://nextjs.org/learn/foundations/about-nextjs)
29-
=======
30-
If you're new to Next.js, check out the [learn Next.js course.](https://nextjs.org/learn)
31-
>>>>>>> 3563d95efe8719bdae8bbd258e6ab4134753348b
3228

33-
<<<<<<< HEAD
29+
30+
3431
Next.js ດູແລໂດຍ [Vercel](https://vercel.com/). ທ່ານສາມາດ [deploy Next.js app](https://nextjs.org/docs/deployment) ໃສ່ໃນ Node.js ຫຼື serverless hosting, ຫຼື server ຂອງທ່ານເອງ. [Fully static Next.js apps](https://nextjs.org/docs/advanced-features/static-html-export) ສາມາດ deploy ໃສ່ໃນ static hosting ໃດກໍ່ໄດ້.
35-
=======
36-
Next.js is maintained by [Vercel](https://vercel.com/). You can [deploy a Next.js app](https://nextjs.org/docs/app/building-your-application/deploying) to any Node.js or serverless hosting, or to your own server. Next.js also supports a [static export](https://nextjs.org/docs/pages/building-your-application/deploying/static-exports) which doesn't require a server.
37-
>>>>>>> 68f417a600c7d7b8c4131e39f8a843a856ae3909
3832

3933
### Remix {/*remix*/}
4034

@@ -97,7 +91,7 @@ Expo ດູແລໂດຍ [Expo (ບໍລິສັດ)](https://expo.dev/about
9791

9892
### Next.js (App Router) {/*nextjs-app-router*/}
9993

100-
<<<<<<< HEAD
94+
10195
**[App Router ຂອງ Next.js](https://beta.nextjs.org/docs/getting-started) ແມ່ນການ redesign ຂອງ Next.js APIs ທີ່ມີຈຸດປະສົງເຕີມເຕັມວິໄສທັດຂອງທີ React full-stack architecture.** ມັນເຮັດທ່ານ fetch data ເປັນ asynchronous ທີ່ແລ່ນເທິງ server ຫຼື ແມ້ແຕ່ລະຫວ່າງການ build.
10296

10397
Next.js ດູແລໂດຍ [Vercel](https://vercel.com/). ທ່ານສາມາດ [deploy a Next.js app](https://nextjs.org/docs/deployment) ໃສ່ Node.js ຫຼື serverless hosting ໃດກໍ່ໄດ້, ຫຼຶ ເຊີເວີຂອງທ່ານເອງ. Next.js ຍັງຮອງຮັບ [static export](https://beta.nextjs.org/docs/configuring/static-export) ຊື່ງບໍ່ໄດ້ຕ້ອງການເຊີເວີ.
@@ -106,11 +100,7 @@ Next.js ດູແລໂດຍ [Vercel](https://vercel.com/). ທ່ານສາ
106100
App Router ຂອງ Next.js ແມ່ນ **ປັດຈຸບັນເປັນເບຕ້າ ແລະ ຍັງບໍ່ແນະນຳສຳລັບ production** (ນະ ເດືອນມີນາ 2023). ເພື່ອລອງມັນໃນ Project Next.js ທີ່ມີຢູ່ແລ້ວ, [ປະຕິບັດຕາມຄູ່ມື incremental migration](https://beta.nextjs.org/docs/upgrade-guide#migrating-from-pages-to-app).
107101

108102
</Pitfall>
109-
=======
110-
**[Next.js's App Router](https://nextjs.org/docs) is a redesign of the Next.js APIs aiming to fulfill the React team’s full-stack architecture vision.** It lets you fetch data in asynchronous components that run on the server or even during the build.
111103

112-
Next.js is maintained by [Vercel](https://vercel.com/). You can [deploy a Next.js app](https://nextjs.org/docs/app/building-your-application/deploying) to any Node.js or serverless hosting, or to your own server. Next.js also supports [static export](https://nextjs.org/docs/app/building-your-application/deploying/static-exports) which doesn't require a server.
113-
>>>>>>> 68f417a600c7d7b8c4131e39f8a843a856ae3909
114104

115105
<DeepDive>
116106

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,11 @@ export default function Square() {
367367

368368
</ConsoleBlock>
369369

370+
<<<<<<< HEAD
370371
Component React ຕ້ອງການ return ໜຶ່ງ JSX element ແລະ ບໍ່ສາມາດສົ່ງ JSX ທີ່ຕິດພັນຫຼາຍອັນເຊັ່ນ ສອງປຸ່ມກົດ. ເພື່ອແກ້ໄຂບັນຫານີ້ທ່ານສາມາດໃຊ້ *fragments* (`<>` ແລະ `</>`) ເພື່ອລວມ JSX ທີ່ຕິດພັນຫຼາຍອັນດັ່ງນີ້:
372+
=======
373+
React components need to return a single JSX element and not multiple adjacent JSX elements like two buttons. To fix this you can use *Fragments* (`<>` and `</>`) to wrap multiple adjacent JSX elements like this:
374+
>>>>>>> af54fc873819892f6050340df236f33a18ba5fb8
371375
372376
```js {3-6}
373377
export default function Square() {

0 commit comments

Comments
 (0)