diff --git a/beta/src/pages/learn/synchronizing-with-effects.md b/beta/src/pages/learn/synchronizing-with-effects.md
index d338f21e..ec4b4a45 100644
--- a/beta/src/pages/learn/synchronizing-with-effects.md
+++ b/beta/src/pages/learn/synchronizing-with-effects.md
@@ -10,17 +10,17 @@ Some components need to synchronize with external systems. For example, you migh
-- What effects are
-- How effects are different from events
-- How to declare an effect in your component
-- Why effects run twice in development mode
-- How to optimize effects with dependencies
+- What Effects are
+- How Effects are different from events
+- How to declare an Effect in your component
+- How to skip re-running an Effect unnecessarily
+- Why Effects run twice in development and how to fix them
-## What are effects and how are they different from events? {/*what-are-effects-and-how-are-they-different-from-events*/}
+## What are Effects and how are they different from events? {/*what-are-effects-and-how-are-they-different-from-events*/}
-Before getting to effects, you need to be familiar with two types of logic inside React components:
+Before getting to Effects, you need to be familiar with two types of logic inside React components:
- **Rendering code** (introduced in [Describing the UI](/learn/describing-the-ui)) lives at the top level of your component. This is where you take the props and state, transform them, and return the JSX you want to see on the screen. [Rendering code must be pure.](/learn/keeping-components-pure) Like a math formula, it should only _calculate_ the result, but not do anything else.
@@ -28,38 +28,38 @@ Before getting to effects, you need to be familiar with two types of logic insid
Sometimes this isn't enough. Consider a `ChatRoom` component that must connect to the chat server whenever it's visible on the screen. Connecting to a server is not a pure calculation (it's a side effect) so it can't happen during rendering. However, there is no single particular event like a click that causes `ChatRoom` to be displayed.
-***Effects* let you specify side effects that are caused by rendering itself, rather than by a particular event.** Sending a message in the chat is an *event* because it is directly caused by the user clicking a specific button. However, setting up a server connection is an *effect* because it needs to happen regardless of which interaction caused the component to appear. Effects run at the end of the [rendering process](/learn/render-and-commit) after the screen updates. This is a good time to synchronize the React components with some external system (like network or a third-party library).
+***Effects* let you specify side effects that are caused by rendering itself, rather than by a particular event.** Sending a message in the chat is an *event* because it is directly caused by the user clicking a specific button. However, setting up a server connection is an *Effect* because it needs to happen regardless of which interaction caused the component to appear. Effects run at the end of the [rendering process](/learn/render-and-commit) after the screen updates. This is a good time to synchronize the React components with some external system (like network or a third-party library).
-Here and later in this text, "effects" refers to the React-specific definition above, i.e. side effects caused by rendering. When we want to refer to the broader programming concept, we'll say "side effects".
+Here and later in this text, capitalized "Effect" refer to the React-specific definition above, i.e. a side effect caused by rendering. To refer to the broader programming concept, we'll say "side effect".
-## You might not need an effect {/*you-might-not-need-an-effect*/}
+## You might not need an Effect {/*you-might-not-need-an-effect*/}
-**Don't rush to add effects to your components.** Keep in mind that effects are typically used to "step out" of your React code and synchronize with some *external* system. This includes browser APIs, third-party widgets, network, and so on. If your effect only adjusts some state based on other state, [you might not need an effect.](/learn/you-might-not-need-an-effect)
+**Don't rush to add Effects to your components.** Keep in mind that Effects are typically used to "step out" of your React code and synchronize with some *external* system. This includes browser APIs, third-party widgets, network, and so on. If your effect only adjusts some state based on other state, [you might not need an Effect.](/learn/you-might-not-need-an-effect)
-## How to write an effect {/*how-to-write-an-effect*/}
+## How to write an Effect {/*how-to-write-an-effect*/}
-To write an effect, follow these three steps:
+To write an Effect, follow these three steps:
-1. **Declare an effect.** By default, your effect will run after every render.
-2. **Specify the effect dependencies.** Most effects should only re-run *when needed* rather than after every render. For example, a fade-in animation should only trigger when a component appears. Connecting and disconnecting to a chat room should only happen when the component appears and disappears, or when the chat room changes. You will learn how to control this by specifying *dependencies.*
-3. **Add cleanup if needed.** Some effects need to specify how to stop, undo, or clean up whatever they were doing. For example, "connect" needs "disconnect," "subscribe" needs "unsubscribe," and "fetch" needs either "cancel" or "ignore". You will learn how to do this by returning a *cleanup function*.
+1. **Declare an Effect.** By default, your Effect will run after every render.
+2. **Specify the Effect dependencies.** Most Effects should only re-run *when needed* rather than after every render. For example, a fade-in animation should only trigger when a component appears. Connecting and disconnecting to a chat room should only happen when the component appears and disappears, or when the chat room changes. You will learn how to control this by specifying *dependencies.*
+3. **Add cleanup if needed.** Some Effects need to specify how to stop, undo, or clean up whatever they were doing. For example, "connect" needs "disconnect," "subscribe" needs "unsubscribe," and "fetch" needs either "cancel" or "ignore". You will learn how to do this by returning a *cleanup function*.
Let's look at each of these steps in detail.
-### Step 1: Declare an effect {/*step-1-declare-an-effect*/}
+### Step 1: Declare an Effect {/*step-1-declare-an-effect*/}
-To declare an effect in your component, import the [`useEffect` Hook](/api/useeffect) from React:
+To declare an Effect in your component, import the [`useEffect` Hook](/api/useeffect) from React:
```js
import { useEffect } from 'react';
```
-Then, call it at the top level of your component and put some code inside your effect:
+Then, call it at the top level of your component and put some code inside your Effect:
```js {2-4}
function MyComponent() {
@@ -72,7 +72,7 @@ function MyComponent() {
Every time your component renders, React will update the screen *and then* run the code inside `useEffect`. In other words, **`useEffect` "delays" a piece of code from running until that render is reflected on the screen.**
-Let's see how you can use an effect to synchronize with an external system. Consider a `` React component. It would be nice to control whether it's playing or paused by passing an `isPlaying` prop to it:
+Let's see how you can use an Effect to synchronize with an external system. Consider a `` React component. It would be nice to control whether it's playing or paused by passing an `isPlaying` prop to it:
```js
;
@@ -102,9 +102,9 @@ function VideoPlayer({ src, isPlaying }) {
const ref = useRef(null);
if (isPlaying) {
- ref.current.play(); // Calling these while rendering isn't allowed.
+ ref.current.play(); // Calling these while rendering isn't allowed.
} else {
- ref.current.pause(); // Also, this crashes.
+ ref.current.pause(); // Also, this crashes.
}
return ;
@@ -135,7 +135,7 @@ video { width: 250px; }
The reason this code isn't correct is that it tries to do something with the DOM node during rendering. In React, [rendering should be a pure calculation](/learn/keeping-components-pure) of JSX and should not contain side effects like modifying the DOM.
-Moreover, by the time `VideoPlayer` is called for the first time, its DOM does not exist yet! There isn't any DOM node yet to call `play()` or `pause()` on, because React doesn't know what DOM to create until after you return the JSX.
+Moreover, when `VideoPlayer` is called for the first time, its DOM does not exist yet! There isn't a DOM node yet to call `play()` or `pause()` on, because React doesn't know what DOM to create until after you return the JSX.
The solution here is to **wrap the side effect with `useEffect` to move it out of the rendering calculation:**
@@ -157,9 +157,9 @@ function VideoPlayer({ src, isPlaying }) {
}
```
-By wrapping the DOM update in an effect, you let React update the screen first. Then your effect runs.
+By wrapping the DOM update in an Effect, you let React update the screen first. Then your Effect runs.
-When your `VideoPlayer` component renders (either the first time or if it re-renders), a few things will happen. First, React will update the screen, ensuring the `