);
}
diff --git a/src/content/learn/conditional-rendering.md b/src/content/learn/conditional-rendering.md
index 895d610d3..95be5d2e0 100644
--- a/src/content/learn/conditional-rendering.md
+++ b/src/content/learn/conditional-rendering.md
@@ -52,13 +52,13 @@ export default function PackingList() {
-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}`.
+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}`.
You can write this as an [`if`/`else` statement](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) like so:
```js
if (isPacked) {
- return
{name} ✔
;
+ return
{name} ✅
;
}
return
{name}
;
```
@@ -70,7 +70,7 @@ If the `isPacked` prop is `true`, this code **returns a different JSX tree.** Wi
```js
function Item({ name, isPacked }) {
if (isPacked) {
- return
{name} ✔
;
+ return
{name} ✅
;
}
return
{name}
;
}
@@ -159,7 +159,7 @@ In practice, returning `null` from a component isn't common because it might sur
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:
```js
-
{name} ✔
+
{name} ✅
```
is very similar to
@@ -172,7 +172,7 @@ Both of the conditional branches return `
...
`:
```js
if (isPacked) {
- return
{name} ✔
;
+ return
{name} ✅
;
}
return
{name}
;
```
@@ -187,7 +187,7 @@ Instead of this:
```js
if (isPacked) {
- return
{name} ✔
;
+ return
{name} ✅
;
}
return
{name}
;
```
@@ -197,12 +197,12 @@ You can write this:
```js
return (
- {isPacked ? name + ' ✔' : name}
+ {isPacked ? name + ' ✅' : name}
);
```
-You can read it as *"if `isPacked` is true, then (`?`) render `name + ' ✔'`, otherwise (`:`) render `name`"*.
+You can read it as *"if `isPacked` is true, then (`?`) render `name + ' ✅'`, otherwise (`:`) render `name`"*.
@@ -222,7 +222,7 @@ function Item({ name, isPacked }) {
{isPacked ? (
- {name + ' ✔'}
+ {name + ' ✅'}
) : (
name
@@ -265,7 +265,7 @@ Another common shortcut you'll encounter is the [JavaScript logical AND (`&&`) o
```js
return (
);
}
@@ -337,7 +337,7 @@ Use an `if` statement to reassign a JSX expression to `itemContent` if `isPacked
```js
if (isPacked) {
- itemContent = name + " ✔";
+ itemContent = name + " ✅";
}
```
@@ -357,7 +357,7 @@ This style is the most verbose, but it's also the most flexible. Here it is in a
function Item({ name, isPacked }) {
let itemContent = name;
if (isPacked) {
- itemContent = name + " ✔";
+ itemContent = name + " ✅";
}
return (
@@ -401,7 +401,7 @@ function Item({ name, isPacked }) {
if (isPacked) {
itemContent = (
- {name + " ✔"}
+ {name + " ✅"}
);
}
@@ -464,7 +464,7 @@ Use the conditional operator (`cond ? a : b`) to render a ❌ if `isPacked` isn
function Item({ name, isPacked }) {
return (
);
}
diff --git a/src/content/learn/describing-the-ui.md b/src/content/learn/describing-the-ui.md
index ce49b85c8..34ee0c01a 100644
--- a/src/content/learn/describing-the-ui.md
+++ b/src/content/learn/describing-the-ui.md
@@ -327,7 +327,7 @@ In this example, the JavaScript `&&` operator is used to conditionally render a
function Item({ name, isPacked }) {
return (
);
}
From b5f28b48441e7e46c11ba066110a3c952c33c4ba Mon Sep 17 00:00:00 2001
From: Bartosz Klonowski <70535775+BartoszKlonowski@users.noreply.github.com>
Date: Fri, 23 Aug 2024 14:21:11 +0200
Subject: [PATCH 2/6] Redirect lists-and-keys to rendering-lists describing key
(#7120)
---
vercel.json | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/vercel.json b/vercel.json
index eac0efb9c..8b0546e37 100644
--- a/vercel.json
+++ b/vercel.json
@@ -24,6 +24,11 @@
"destination": "/learn/rendering-lists#keeping-list-items-in-order-with-key",
"permanent": false
},
+ {
+ "source": "/docs/lists-and-keys",
+ "destination": "/learn/rendering-lists#keeping-list-items-in-order-with-key",
+ "permanent": false
+ },
{
"source": "/link/invalid-hook-call",
"destination": "/warnings/invalid-hook-call-warning",
From 7d50c3ffd4df2dc7903f4e41069653a456a9c223 Mon Sep 17 00:00:00 2001
From: Bartosz Klonowski <70535775+BartoszKlonowski@users.noreply.github.com>
Date: Sun, 25 Aug 2024 22:32:42 +0200
Subject: [PATCH 3/6] Emphasize the second problem paragraph with chain of
effects example (#7108)
* Emphasize the second problem acapit with chain of effects example
* Replace 'One' with 'First' to keep problems counting consistent
---
src/content/learn/you-might-not-need-an-effect.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/content/learn/you-might-not-need-an-effect.md b/src/content/learn/you-might-not-need-an-effect.md
index 66cdc3117..27031720d 100644
--- a/src/content/learn/you-might-not-need-an-effect.md
+++ b/src/content/learn/you-might-not-need-an-effect.md
@@ -408,9 +408,9 @@ function Game() {
There are two problems with this code.
-One problem is that it is very inefficient: the component (and its children) have to re-render between each `set` call in the chain. In the example above, in the worst case (`setCard` → render → `setGoldCardCount` → render → `setRound` → render → `setIsGameOver` → render) there are three unnecessary re-renders of the tree below.
+First problem is that it is very inefficient: the component (and its children) have to re-render between each `set` call in the chain. In the example above, in the worst case (`setCard` → render → `setGoldCardCount` → render → `setRound` → render → `setIsGameOver` → render) there are three unnecessary re-renders of the tree below.
-Even if it weren't slow, as your code evolves, you will run into cases where the "chain" you wrote doesn't fit the new requirements. Imagine you are adding a way to step through the history of the game moves. You'd do it by updating each state variable to a value from the past. However, setting the `card` state to a value from the past would trigger the Effect chain again and change the data you're showing. Such code is often rigid and fragile.
+The second problem is that even if it weren't slow, as your code evolves, you will run into cases where the "chain" you wrote doesn't fit the new requirements. Imagine you are adding a way to step through the history of the game moves. You'd do it by updating each state variable to a value from the past. However, setting the `card` state to a value from the past would trigger the Effect chain again and change the data you're showing. Such code is often rigid and fragile.
In this case, it's better to calculate what you can during rendering, and adjust the state in the event handler:
From 50004fa267465da70fafdbaa7914ebf9fe00ae83 Mon Sep 17 00:00:00 2001
From: Denis Radin
Date: Mon, 26 Aug 2024 19:00:18 +0300
Subject: [PATCH 4/6] Adds React Advanced London 2024 (#7127)
PR to add Radv 2024 conference
---
src/content/community/conferences.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/content/community/conferences.md b/src/content/community/conferences.md
index 5070fbc41..3e2d76060 100644
--- a/src/content/community/conferences.md
+++ b/src/content/community/conferences.md
@@ -55,6 +55,11 @@ October 18, 2024. In-person in Brussels, Belgium (hybrid event)
[Website](https://www.react.brussels/) - [Twitter](https://x.com/BrusselsReact)
+### React Advanced London 2024 {/*react-advanced-london-2024*/}
+October 25 & 28, 2024. In-person in London, UK + online (hybrid event)
+
+[Website](https://reactadvanced.com/) - [Twitter](https://x.com/reactadvanced)
+
### React Africa 2024 {/*react-africa-2024*/}
November 29, 2024. In-person in Casablanca, Morocco (hybrid event)
From 40d73490733a1665596eee8b547278231db3b8e3 Mon Sep 17 00:00:00 2001
From: Sophie Alpert
Date: Wed, 28 Aug 2024 17:58:32 -0700
Subject: [PATCH 5/6] Parallel structure
---
src/content/reference/react/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content/reference/react/index.md b/src/content/reference/react/index.md
index 5663af392..a68ddc014 100644
--- a/src/content/reference/react/index.md
+++ b/src/content/reference/react/index.md
@@ -15,7 +15,7 @@ The React reference documentation is broken down into functional subsections:
Programmatic React features:
* [Hooks](/reference/react/hooks) - Use different React features from your components.
-* [Components](/reference/react/components) - Documents built-in components that you can use in your JSX.
+* [Components](/reference/react/components) - Built-in components that you can use in your JSX.
* [APIs](/reference/react/apis) - APIs that are useful for defining components.
* [Directives](/reference/rsc/directives) - Provide instructions to bundlers compatible with React Server Components.
From c2d61310664cc0d94f89ca21fc1d44e674329799 Mon Sep 17 00:00:00 2001
From: Tom Eastman
Date: Sun, 1 Sep 2024 18:31:29 +1200
Subject: [PATCH 6/6] Fix typo 'bulit' -> 'built' (#7138)
Co-authored-by: Tom Eastman
---
src/content/reference/react-dom/components/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content/reference/react-dom/components/index.md b/src/content/reference/react-dom/components/index.md
index c9b355c84..ec2e1d2ee 100644
--- a/src/content/reference/react-dom/components/index.md
+++ b/src/content/reference/react-dom/components/index.md
@@ -34,7 +34,7 @@ They are special in React because passing the `value` prop to them makes them *[
## Resource and Metadata Components {/*resource-and-metadata-components*/}
-These bulit-in browser components let you load external resources or annotate the document with metadata:
+These built-in browser components let you load external resources or annotate the document with metadata:
* [``](/reference/react-dom/components/link)
* [``](/reference/react-dom/components/meta)