Skip to content

Commit 3a292ee

Browse files
committed
Capitalize Components in documentation - Updated 7 instances across 2 files - Fixes #6713
1 parent a2c1f90 commit 3a292ee

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/content/learn/conditional-rendering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export default function PackingList() {
256256

257257
</Sandpack>
258258

259-
This style works well for simple conditions, but use it in moderation. If your components get messy with too much nested conditional markup, consider extracting child components to clean things up. In React, markup is a part of your code, so you can use tools like variables and functions to tidy up complex expressions.
259+
This style works well for simple conditions, but use it in moderation. If your Components get messy with too much nested conditional markup, consider extracting child components to clean things up. In React, markup is a part of your code, so you can use tools like variables and functions to tidy up complex expressions.
260260

261261
### Logical AND operator (`&&`) {/*logical-and-operator-*/}
262262

src/content/learn/keeping-components-pure.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ title: Keeping Components Pure
44

55
<Intro>
66

7-
Some JavaScript functions are *pure.* Pure functions only perform a calculation and nothing more. By strictly only writing your components as pure functions, you can avoid an entire class of baffling bugs and unpredictable behavior as your codebase grows. To get these benefits, though, there are a few rules you must follow.
7+
Some JavaScript functions are *pure.* Pure functions only perform a calculation and nothing more. By strictly only writing your Components as pure functions, you can avoid an entire class of baffling bugs and unpredictable behavior as your codebase grows. To get these benefits, though, there are a few rules you must follow.
88

99
</Intro>
1010

1111
<YouWillLearn>
1212

1313
* What purity is and how it helps you avoid bugs
1414
* How to keep components pure by keeping changes out of the render phase
15-
* How to use Strict Mode to find mistakes in your components
15+
* How to use Strict Mode to find mistakes in your Components
1616

1717
</YouWillLearn>
1818

@@ -81,7 +81,7 @@ If you pass `drinkers={4}`, it will return JSX containing `4 cups of water`. Alw
8181

8282
Just like a math formula.
8383

84-
You could think of your components as recipes: if you follow them and don't introduce new ingredients during the cooking process, you will get the same dish every time. That "dish" is the JSX that the component serves to React to [render.](/learn/render-and-commit)
84+
You could think of your Components as recipes: if you follow them and don't introduce new ingredients during the cooking process, you will get the same dish every time. That "dish" is the JSX that the component serves to React to [render.](/learn/render-and-commit)
8585

8686
<Illustration src="/images/docs/illustrations/i_puritea-recipe.png" alt="A tea recipe for x people: take x cups of water, add x spoons of tea and 0.5x spoons of spices, and 0.5x cups of milk" />
8787

@@ -143,7 +143,7 @@ export default function TeaSet() {
143143

144144
Now your component is pure, as the JSX it returns only depends on the `guest` prop.
145145

146-
In general, you should not expect your components to be rendered in any particular order. It doesn't matter if you call <Math><MathI>y</MathI> = 2<MathI>x</MathI></Math> before or after <Math><MathI>y</MathI> = 5<MathI>x</MathI></Math>: both formulas will resolve independently of each other. In the same way, each component should only "think for itself", and not attempt to coordinate with or depend upon others during rendering. Rendering is like a school exam: each component should calculate JSX on their own!
146+
In general, you should not expect your Components to be rendered in any particular order. It doesn't matter if you call <Math><MathI>y</MathI> = 2<MathI>x</MathI></Math> before or after <Math><MathI>y</MathI> = 5<MathI>x</MathI></Math>: both formulas will resolve independently of each other. In the same way, each component should only "think for itself", and not attempt to coordinate with or depend upon others during rendering. Rendering is like a school exam: each component should calculate JSX on their own!
147147

148148
<DeepDive>
149149

@@ -219,7 +219,7 @@ Every new React feature we're building takes advantage of purity. From data fetc
219219
* **It minds its own business.** It should not change any objects or variables that existed before rendering.
220220
* **Same inputs, same output.** Given the same inputs, a component should always return the same JSX.
221221
* Rendering can happen at any time, so components should not depend on each others' rendering sequence.
222-
* You should not mutate any of the inputs that your components use for rendering. That includes props, state, and context. To update the screen, ["set" state](/learn/state-a-components-memory) instead of mutating preexisting objects.
222+
* You should not mutate any of the inputs that your Components use for rendering. That includes props, state, and context. To update the screen, ["set" state](/learn/state-a-components-memory) instead of mutating preexisting objects.
223223
* Strive to express your component's logic in the JSX you return. When you need to "change things", you'll usually want to do it in an event handler. As a last resort, you can `useEffect`.
224224
* Writing pure functions takes a bit of practice, but it unlocks the power of React's paradigm.
225225

0 commit comments

Comments
 (0)