Skip to content

Commit d3a5f8a

Browse files
authored
Capitalize word "Fragment" (#6425)
Summary of changes: See <#6417> Co-authored-by: xuan.huang <[email protected]>
1 parent fcd0006 commit d3a5f8a

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

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

+1-2
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/learn/conditional-rendering.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ export default function PackingList() {
626626
627627
Note that you must write `importance > 0 && ...` rather than `importance && ...` so that if the `importance` is `0`, `0` isn't rendered as the result!
628628
629-
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>`.
629+
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>`.
630630
631631
</Solution>
632632

src/content/learn/rendering-lists.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ hr {
11451145

11461146
<Hint>
11471147

1148-
You'll either need to convert `map` to a manual loop, or use a fragment.
1148+
You'll either need to convert `map` to a manual loop, or use a Fragment.
11491149

11501150
</Hint>
11511151

@@ -1208,7 +1208,7 @@ hr {
12081208

12091209
Using the original line index as a `key` doesn't work anymore because each separator and paragraph are now in the same array. However, you can give each of them a distinct key using a suffix, e.g. `key={i + '-text'}`.
12101210

1211-
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:
1211+
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:
12121212

12131213
<Sandpack>
12141214

@@ -1254,7 +1254,7 @@ hr {
12541254

12551255
</Sandpack>
12561256

1257-
Remember, fragments (often written as `<> </>`) let you group JSX nodes without adding extra `<div>`s!
1257+
Remember, Fragments (often written as `<> </>`) let you group JSX nodes without adding extra `<div>`s!
12581258

12591259
</Solution>
12601260

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,11 @@ You'll get this error:
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-
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:
369+
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:
370370

371371
```js {3-6}
372372
export default function Square() {

0 commit comments

Comments
 (0)