Skip to content

Commit a220bb3

Browse files
authored
docs: replace check mark emoji to check mark button emoji (#7121)
1 parent 2bfa7a6 commit a220bb3

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Use the conditional operator (`cond ? a : b`) to render a ❌ if `isPacked` isn
269269
function Item({ name, isPacked }) {
270270
return (
271271
<li className="item">
272-
{name} {isPacked && ''}
272+
{name} {isPacked && ''}
273273
</li>
274274
);
275275
}
@@ -307,7 +307,7 @@ export default function PackingList() {
307307
function Item({ name, isPacked }) {
308308
return (
309309
<li className="item">
310-
{name} {isPacked ? '' : ''}
310+
{name} {isPacked ? '' : ''}
311311
</li>
312312
);
313313
}

src/content/learn/conditional-rendering.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ export default function PackingList() {
5252
5353
</Sandpack>
5454
55-
Notice that some of the `Item` components have their `isPacked` prop set to `true` instead of `false`. You want to add a checkmark () to packed items if `isPacked={true}`.
55+
Notice that some of the `Item` components have their `isPacked` prop set to `true` instead of `false`. You want to add a checkmark () to packed items if `isPacked={true}`.
5656
5757
You can write this as an [`if`/`else` statement](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) like so:
5858
5959
```js
6060
if (isPacked) {
61-
return <li className="item">{name} </li>;
61+
return <li className="item">{name} </li>;
6262
}
6363
return <li className="item">{name}</li>;
6464
```
@@ -70,7 +70,7 @@ If the `isPacked` prop is `true`, this code **returns a different JSX tree.** Wi
7070
```js
7171
function Item({ name, isPacked }) {
7272
if (isPacked) {
73-
return <li className="item">{name} </li>;
73+
return <li className="item">{name} </li>;
7474
}
7575
return <li className="item">{name}</li>;
7676
}
@@ -159,7 +159,7 @@ In practice, returning `null` from a component isn't common because it might sur
159159
In the previous example, you controlled which (if any!) JSX tree would be returned by the component. You may already have noticed some duplication in the render output:
160160

161161
```js
162-
<li className="item">{name} </li>
162+
<li className="item">{name} </li>
163163
```
164164

165165
is very similar to
@@ -172,7 +172,7 @@ Both of the conditional branches return `<li className="item">...</li>`:
172172

173173
```js
174174
if (isPacked) {
175-
return <li className="item">{name} </li>;
175+
return <li className="item">{name} </li>;
176176
}
177177
return <li className="item">{name}</li>;
178178
```
@@ -187,7 +187,7 @@ Instead of this:
187187

188188
```js
189189
if (isPacked) {
190-
return <li className="item">{name} </li>;
190+
return <li className="item">{name} </li>;
191191
}
192192
return <li className="item">{name}</li>;
193193
```
@@ -197,12 +197,12 @@ You can write this:
197197
```js
198198
return (
199199
<li className="item">
200-
{isPacked ? name + ' ' : name}
200+
{isPacked ? name + ' ' : name}
201201
</li>
202202
);
203203
```
204204

205-
You can read it as *"if `isPacked` is true, then (`?`) render `name + ' '`, otherwise (`:`) render `name`"*.
205+
You can read it as *"if `isPacked` is true, then (`?`) render `name + ' '`, otherwise (`:`) render `name`"*.
206206

207207
<DeepDive>
208208

@@ -222,7 +222,7 @@ function Item({ name, isPacked }) {
222222
<li className="item">
223223
{isPacked ? (
224224
<del>
225-
{name + ' '}
225+
{name + ' '}
226226
</del>
227227
) : (
228228
name
@@ -265,7 +265,7 @@ Another common shortcut you'll encounter is the [JavaScript logical AND (`&&`) o
265265
```js
266266
return (
267267
<li className="item">
268-
{name} {isPacked && ''}
268+
{name} {isPacked && ''}
269269
</li>
270270
);
271271
```
@@ -280,7 +280,7 @@ Here it is in action:
280280
function Item({ name, isPacked }) {
281281
return (
282282
<li className="item">
283-
{name} {isPacked && ''}
283+
{name} {isPacked && ''}
284284
</li>
285285
);
286286
}
@@ -337,7 +337,7 @@ Use an `if` statement to reassign a JSX expression to `itemContent` if `isPacked
337337
338338
```js
339339
if (isPacked) {
340-
itemContent = name + " ";
340+
itemContent = name + " ";
341341
}
342342
```
343343
@@ -357,7 +357,7 @@ This style is the most verbose, but it's also the most flexible. Here it is in a
357357
function Item({ name, isPacked }) {
358358
let itemContent = name;
359359
if (isPacked) {
360-
itemContent = name + " ";
360+
itemContent = name + " ";
361361
}
362362
return (
363363
<li className="item">
@@ -401,7 +401,7 @@ function Item({ name, isPacked }) {
401401
if (isPacked) {
402402
itemContent = (
403403
<del>
404-
{name + " "}
404+
{name + " "}
405405
</del>
406406
);
407407
}
@@ -464,7 +464,7 @@ Use the conditional operator (`cond ? a : b`) to render a ❌ if `isPacked` isn
464464
function Item({ name, isPacked }) {
465465
return (
466466
<li className="item">
467-
{name} {isPacked && ''}
467+
{name} {isPacked && ''}
468468
</li>
469469
);
470470
}
@@ -502,7 +502,7 @@ export default function PackingList() {
502502
function Item({ name, isPacked }) {
503503
return (
504504
<li className="item">
505-
{name} {isPacked ? '' : ''}
505+
{name} {isPacked ? '' : ''}
506506
</li>
507507
);
508508
}

src/content/learn/describing-the-ui.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ In this example, the JavaScript `&&` operator is used to conditionally render a
327327
function Item({ name, isPacked }) {
328328
return (
329329
<li className="item">
330-
{name} {isPacked && ''}
330+
{name} {isPacked && ''}
331331
</li>
332332
);
333333
}

0 commit comments

Comments
 (0)