Skip to content

Commit a4f0530

Browse files
committed
Edit
1 parent 03b63eb commit a4f0530

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/content/reference/rules/components-and-hooks-must-be-pure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Try building a component that displays the time in real-time in our [challenge](
4343
4444
## Side effects must run outside of render {/*side-effects-must-run-outside-of-render*/}
4545
46-
Side effects should not run in render, as React can render components multiple times to create the best possible user experience.
46+
[Side effects](http://localhost:3000/learn/keeping-components-pure#side-effects-unintended-consequences) should not run in render, as React can render components multiple times to create the best possible user experience.
4747
4848
While render must be kept pure, side effects are necessary at some point in order for your app to do anything interesting, like showing something on the screen! The key point of this rule is that side effects should not run in render, as React can render components multiple times. In most cases, you'll use [event handlers](learn/responding-to-events) to handle side effects.
4949

src/content/reference/rules/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ We strongly recommend using Strict Mode alongside React's ESLint plugin to help
1717

1818
You can think of React's constraints like the grammatical rules and patterns of languages: they constrain what we can do with words, so that we can correctly and efficiently communicate our thoughts.
1919

20-
These rules have been used in the design of all of React's features over the years. React's Strict Mode enforces several of these rules at runtime in DEV mode, and with the release of React's upcoming compiler, more rules will now be statically checked to help you find more bugs as well as allow for correct optimisation of your code.
20+
These rules have been used in the design of all of React's features over the years. React's Strict Mode enforces several of these rules at runtime in DEV mode, and with the release of React's upcoming compiler, more rules will now be statically checked to help you find more bugs as well as allow for correct optimization of your code.
2121

2222
The Rules of React are proven rules used at companies like Meta that help you maintain an application and codebase that scales with you. When followed, your codebase becomes easier to understand and maintain, is less buggy, and helps React ensure your code runs efficiently by default.
2323
</DeepDive>

0 commit comments

Comments
 (0)