Skip to content

Commit ff8f99d

Browse files
merging all conflicts
2 parents c4da3fe + 943e3ce commit ff8f99d

File tree

13 files changed

+39
-18
lines changed

13 files changed

+39
-18
lines changed

src/content/blog/2023/03/16/introducing-react-dev.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ export default function PackingList() {
428428

429429
Note that you must write `importance > 0 && ...` rather than `importance && ...` so that if the `importance` is `0`, `0` isn't rendered as the result!
430430

431-
In this solution, two separate conditions are used to insert a space between then 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>`.
431+
In this solution, two separate conditions are used to insert a space between then 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>`.
432432

433433
</Solution>
434434

@@ -643,4 +643,3 @@ On the development front, thanks to [Jared Palmer](https://twitter.com/jaredpalm
643643
Huge thanks to the folks who volunteered their time to participate in the alpha and beta testing program. Your enthusiasm and invaluable feedback helped us shape these docs. A special shout out to our beta tester, [Debbie O'Brien](https://twitter.com/debs_obrien), who gave a talk about her experience using the React docs at React Conf 2021.
644644

645645
Finally, thanks to the React community for being the inspiration behind this effort. You are the reason we do this, and we hope that the new docs will help you use React to build any user interface that you want.
646-

src/content/community/versioning-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ In general, we *don't* bump the major version number for changes to:
4646

4747
* **Development warnings.** Since these don't affect production behavior, we may add new warnings or modify existing warnings in between major versions. In fact, this is what allows us to reliably warn about upcoming breaking changes.
4848
* **APIs starting with `unstable_`.** These are provided as experimental features whose APIs we are not yet confident in. By releasing these with an `unstable_` prefix, we can iterate faster and get to a stable API sooner.
49-
* **Alpha and canary versions of React.** We provide alpha versions of React as a way to test new features early, but we need the flexibility to make changes based on what we learn in the alpha period. If you use these versions, note that APIs may change before the stable release.
49+
* **Alpha and Canary versions of React.** We provide alpha versions of React as a way to test new features early, but we need the flexibility to make changes based on what we learn in the alpha period. If you use these versions, note that APIs may change before the stable release.
5050
* **Undocumented APIs and internal data structures.** If you access internal property names like `__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED` or `__reactInternalInstance$uk43rzhitjg`, there is no warranty. You are on your own.
5151

5252
This policy is designed to be pragmatic: certainly, we don't want to cause headaches for you. If we bumped the major version for all of these changes, we would end up releasing more major versions and ultimately causing more versioning pain for the community. It would also mean that we can't make progress in improving React as fast as we'd like.

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+
>>>>>>> 943e3ce4e52be56bcd75b679448847302f557da1
630634
631635
</Solution>
632636

src/content/learn/rendering-lists.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,11 @@ hr {
11491149

11501150
<Hint>
11511151

1152+
<<<<<<< HEAD
11521153
ທ່ານຈະຕ້ອງແປງ `map` ເປັນ loop ດ້ວຍໂຕເອງ, ຫຼື ໃຊ້ fragment.
1154+
=======
1155+
You'll either need to convert `map` to a manual loop, or use a Fragment.
1156+
>>>>>>> 943e3ce4e52be56bcd75b679448847302f557da1
11531157
11541158
</Hint>
11551159

@@ -1212,7 +1216,11 @@ hr {
12121216

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

1219+
<<<<<<< HEAD
12151220
ອີກວິທີໜຶ່ງ, ທ່ານສາມາດສະແດງຜົນ collection ຂອງ fragment ທີ່ປະກອບມີ `<hr />` and `<p>...</p>`. ເຖິງຢ່າງໃດກໍຕາມ, syntax `<>...</>` ບໍ່ຮອງຮັບການສົ່ງຜ່ານ key, ດັ່ງນັ້ນທ່ານຕ້ອງໄດ້ຂຽນ `<Fragment>` ຢ່າງຊັດເຈນ:
1221+
=======
1222+
Alternatively, you could render a collection of Fragments which contain `<hr />` and `<p>...</p>`. However, the `<>...</>` shorthand syntax doesn't support passing keys, so you'd have to write `<Fragment>` explicitly:
1223+
>>>>>>> 943e3ce4e52be56bcd75b679448847302f557da1
12161224
12171225
<Sandpack>
12181226

@@ -1258,7 +1266,11 @@ hr {
12581266

12591267
</Sandpack>
12601268

1269+
<<<<<<< HEAD
12611270
ຈື່ໄວ້ວ່າ, fragment (ມັກຂຽນເປັນ `<> </>`) ໃຫ້ທ່ານ group JSX node ໂດຍບໍ່ຕ້ອງເພີ່ມ `<div>`!
1271+
=======
1272+
Remember, Fragments (often written as `<> </>`) let you group JSX nodes without adding extra `<div>`s!
1273+
>>>>>>> 943e3ce4e52be56bcd75b679448847302f557da1
12621274
12631275
</Solution>
12641276

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,15 @@ export default function Square() {
362362

363363
<ConsoleBlock level="error">
364364

365-
/src/App.js: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment `<>...</>`?
365+
/src/App.js: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX Fragment `<>...</>`?
366366

367367
</ConsoleBlock>
368368

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

src/content/reference/react-dom/components/input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To display an input, render the [built-in browser `<input>`](https://developer.m
3434

3535
<Canary>
3636

37-
React's extensions to the `formAction` prop are currently only available in React's canary and experimental channels. In stable releases of React `formAction` works only as a [built-in browser HTML component](https://react.dev/reference/react-dom/components#all-html-components). Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
37+
React's extensions to the `formAction` prop are currently only available in React's Canary and experimental channels. In stable releases of React `formAction` works only as a [built-in browser HTML component](https://react.dev/reference/react-dom/components#all-html-components). Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
3838
</Canary>
3939

4040
[`formAction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#formaction): A string or function. Overrides the parent `<form action>` for `type="submit"` and `type="image"`. When a URL is passed to `action` the form will behave like a standard HTML form. When a function is passed to `formAction` the function will handle the form submission. See [`<form action>`](/reference/react-dom/components/form#props).

src/content/reference/react-dom/hooks/useFormState.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ canary: true
55

66
<Canary>
77

8-
The `useFormState` Hook is currently only available in React's canary and experimental channels. Learn more about [release channels here](/community/versioning-policy#all-release-channels). In addition, you need to use a framework that supports [React Server Components](/reference/react/use-client) to get the full benefit of `useFormState`.
8+
The `useFormState` Hook is currently only available in React's Canary and experimental channels. Learn more about [release channels here](/community/versioning-policy#all-release-channels). In addition, you need to use a framework that supports [React Server Components](/reference/react/use-client) to get the full benefit of `useFormState`.
99

1010
</Canary>
1111

src/content/reference/react-dom/hooks/useFormStatus.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ canary: true
55

66
<Canary>
77

8-
The `useFormStatus` Hook is currently only available in React's canary and experimental channels. Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
8+
The `useFormStatus` Hook is currently only available in React's Canary and experimental channels. Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
99

1010
</Canary>
1111

@@ -38,7 +38,7 @@ function Submit() {
3838
return <button disabled={status.pending}>Submit</button>
3939
}
4040

41-
export default App() {
41+
export default function App() {
4242
return (
4343
<form action={action}>
4444
<Submit />

src/content/reference/react/StrictMode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Strict Mode enables the following checks in development:
9595

9696
---
9797

98-
### Enabling strict mode for a part of the app {/*enabling-strict-mode-for-a-part-of-the-app*/}
98+
### Enabling Strict Mode for a part of the app {/*enabling-strict-mode-for-a-part-of-the-app*/}
9999

100100
You can also enable Strict Mode for any part of your application:
101101

src/content/reference/react/use-server.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,13 @@ async function requestUsername(formData) {
115115
// ...
116116
}
117117

118-
export default App() {
119-
<form action={requestUsername}>
120-
<input type="text" name="username" />
121-
<button type="submit">Request</button>
122-
</form>
118+
export default function App() {
119+
return (
120+
<form action={requestUsername}>
121+
<input type="text" name="username" />
122+
<button type="submit">Request</button>
123+
</form>
124+
);
123125
}
124126
```
125127

0 commit comments

Comments
 (0)