Skip to content

Commit 7e8447a

Browse files
authored
[Beta] Update the effect with a capital letter (#5027)
1 parent ee96afd commit 7e8447a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

beta/src/content/learn/escape-hatches.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ Read **[Separating Events from Effects](/learn/separating-events-from-effects)**
602602

603603
</LearnMore>
604604

605-
## Removing effect dependencies {/*removing-effect-dependencies*/}
605+
## Removing Effect dependencies {/*removing-effect-dependencies*/}
606606

607607
When you write an Effect, the linter will verify that you've included every reactive value (like props and state) that the Effect reads in the list of your Effect's dependencies. This ensures that your Effect remains synchronized with the latest props and state of your component. Unnecessary dependencies may cause your Effect to run too often, or even create an infinite loop. The way you remove them depends on the case.
608608

beta/src/content/learn/manipulating-the-dom-with-refs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ In general, you [don't want](/learn/referencing-values-with-refs#best-practices-
489489

490490
React sets `ref.current` during the commit. Before updating the DOM, React sets the affected `ref.current` values to `null`. After updating the DOM, React immediately sets them to the corresponding DOM nodes.
491491

492-
**Usually, you will access refs from event handlers.** If you want to do something with a ref, but there is no particular event to do it in, you might need an effect. We will discuss effects on the next pages.
492+
**Usually, you will access refs from event handlers.** If you want to do something with a ref, but there is no particular event to do it in, you might need an Effect. We will discuss effects on the next pages.
493493

494494
<DeepDive title="Flushing state updates synchronously with flushSync">
495495

beta/src/content/learn/synchronizing-with-effects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Here and later in this text, capitalized "Effect" refers to the React-specific d
3939

4040
## You might not need an Effect {/*you-might-not-need-an-effect*/}
4141

42-
**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)
42+
**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)
4343

4444
## How to write an Effect {/*how-to-write-an-effect*/}
4545

beta/src/content/learn/you-might-not-need-an-effect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To help you gain the right intuition, let's look at some common concrete example
3232

3333
### Updating state based on props or state {/*updating-state-based-on-props-or-state*/}
3434

35-
Suppose you have a component with two state variables: `firstName` and `lastName`. You want to calculate a `fullName` from them by concatenating them. Moreover, you'd like `fullName` to update whenever `firstName` or `lastName` change. Your first instinct might be to add a `fullName` state variable and update it in an effect:
35+
Suppose you have a component with two state variables: `firstName` and `lastName`. You want to calculate a `fullName` from them by concatenating them. Moreover, you'd like `fullName` to update whenever `firstName` or `lastName` change. Your first instinct might be to add a `fullName` state variable and update it in an Effect:
3636

3737
```js {5-9}
3838
function Form() {

0 commit comments

Comments
 (0)