Skip to content

Commit

Permalink
Merge pull request #58 from reactjs/sync-af54fc87
Browse files Browse the repository at this point in the history
Sync with react.dev @ af54fc8
  • Loading branch information
TheBrown committed Jan 28, 2024
2 parents ab8ae53 + 1c5d418 commit efda5e4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
4 changes: 4 additions & 0 deletions src/content/learn/conditional-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,11 @@ export default function PackingList() {
ສັງເກດທ່ານຕ້ອງຂຽນ `importance > 0 && ...` ແທນທີ່ຈະເປັນ `importance && ...` ສະນັ້ນຫາກ `importance` ເປັນ `0`, ຜົນລັບຈະບໍ່ສະແດງ `0`!
<<<<<<< HEAD
ໃນວິທີການນີ້, ຈະໃຊ້ເງື່ອນໄຂສອງເງື່ອນໄຂແຍກກັນເພື່ອໃສ່ຊ່ອງວ່າງລະຫວ່າງຊື່ ແລະ label. ອີກວິທີໜຶ່ງ, ທ່ານສາມາດໃຊ້ fragment ທີ່ມີຊ່ອງວ່າງນຳໜ້າ: `importance > 0 && <> <i>...</i></>` ຫຼື ເພີ່ມຊ່ອງວ່າງພາຍໃນ `importance > 0 && <> <i>...</i></>`.
=======
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>`.
>>>>>>> af54fc873819892f6050340df236f33a18ba5fb8
</Solution>
Expand Down
5 changes: 4 additions & 1 deletion src/content/learn/rendering-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,7 @@ hr {




</Hint>

<Solution>
Expand Down Expand Up @@ -1211,9 +1212,11 @@ hr {

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


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



<Sandpack>

```js
Expand Down Expand Up @@ -1258,10 +1261,10 @@ hr {

</Sandpack>


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



</Solution>

</Challenges>
16 changes: 3 additions & 13 deletions src/content/learn/start-a-new-react-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,11 @@ title: ເລີ່ມ Project React ໃໝ່
npx create-next-app@latest
</TerminalBlock>

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

<<<<<<< HEAD


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 ໃດກໍ່ໄດ້.
=======
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.
>>>>>>> 68f417a600c7d7b8c4131e39f8a843a856ae3909

### Remix {/*remix*/}

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

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

<<<<<<< HEAD

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

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) ຊື່ງບໍ່ໄດ້ຕ້ອງການເຊີເວີ.
Expand All @@ -106,11 +100,7 @@ Next.js ດູແລໂດຍ [Vercel](https://vercel.com/). ທ່ານສາ
App Router ຂອງ Next.js ແມ່ນ **ປັດຈຸບັນເປັນເບຕ້າ ແລະ ຍັງບໍ່ແນະນຳສຳລັບ production** (ນະ ເດືອນມີນາ 2023). ເພື່ອລອງມັນໃນ Project Next.js ທີ່ມີຢູ່ແລ້ວ, [ປະຕິບັດຕາມຄູ່ມື incremental migration](https://beta.nextjs.org/docs/upgrade-guide#migrating-from-pages-to-app).

</Pitfall>
=======
**[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.

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.
>>>>>>> 68f417a600c7d7b8c4131e39f8a843a856ae3909

<DeepDive>

Expand Down
4 changes: 4 additions & 0 deletions src/content/learn/tutorial-tic-tac-toe.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,11 @@ export default function Square() {

</ConsoleBlock>

<<<<<<< HEAD
Component React ຕ້ອງການ return ໜຶ່ງ JSX element ແລະ ບໍ່ສາມາດສົ່ງ JSX ທີ່ຕິດພັນຫຼາຍອັນເຊັ່ນ ສອງປຸ່ມກົດ. ເພື່ອແກ້ໄຂບັນຫານີ້ທ່ານສາມາດໃຊ້ *fragments* (`<>` ແລະ `</>`) ເພື່ອລວມ JSX ທີ່ຕິດພັນຫຼາຍອັນດັ່ງນີ້:
=======
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:
>>>>>>> af54fc873819892f6050340df236f33a18ba5fb8
```js {3-6}
export default function Square() {
Expand Down

0 comments on commit efda5e4

Please sign in to comment.