Skip to content

Commit 3188fed

Browse files
authored
Merge pull request #533 from reactjs/sync-93177e6c
Sync with react.dev @ 93177e6
2 parents 564b777 + 0c9317c commit 3188fed

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/components/MDX/TeamMember.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function TeamMember({
6868
<ExternalLink
6969
aria-label="React on Twitter"
7070
href={`https://twitter.com/${twitter}`}
71-
className="hover:text-primary dark:text-primary-dark flex flex-row items-center">
71+
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
7272
<IconTwitter className="pe-1" />
7373
{twitter}
7474
</ExternalLink>
@@ -90,7 +90,7 @@ export function TeamMember({
9090
<ExternalLink
9191
aria-label="GitHub Profile"
9292
href={`https://github.com/${github}`}
93-
className="hover:text-primary dark:text-primary-dark flex flex-row items-center">
93+
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
9494
<IconGitHub className="pe-1" /> {github}
9595
</ExternalLink>
9696
</div>
@@ -99,7 +99,7 @@ export function TeamMember({
9999
<ExternalLink
100100
aria-label="Personal Site"
101101
href={`https://${personal}`}
102-
className="hover:text-primary dark:text-primary-dark flex flex-row items-center">
102+
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
103103
<IconLink className="pe-1" /> {personal}
104104
</ExternalLink>
105105
)}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This reference page covers advanced topics and requires familiarity with the con
1616

1717
One of the key concepts that makes React, _React_ is _purity_. A pure component or hook is one that is:
1818

19-
* **Idempotent** – You [always get the same result everytime](/learn/keeping-components-pure#purity-components-as-formulas) you run it with the same inputs – props, state, context for component inputs; and arguments for hook inputs.
19+
* **Idempotent** – You [always get the same result every time](/learn/keeping-components-pure#purity-components-as-formulas) you run it with the same inputs – props, state, context for component inputs; and arguments for hook inputs.
2020
* **Has no side effects in render** – Code with side effects should run [**separately from rendering**](#how-does-react-run-your-code). For example as an [event handler](/learn/responding-to-events) – where the user interacts with the UI and causes it to update; or as an [Effect](/reference/react/useEffect) – which runs after render.
2121
* **Does not mutate non-local values**: Components and Hooks should [never modify values that aren't created locally](#mutation) in render.
2222

@@ -70,7 +70,7 @@ function Dropdown() {
7070

7171
## Components and Hooks must be idempotent {/*components-and-hooks-must-be-idempotent*/}
7272

73-
Components must always return the same output with respect to their inputs – props, state, and context. This is known as _idempotency_. [Idempotency](https://en.wikipedia.org/wiki/Idempotence) is a term popularized in functional programming. It refers to the idea that you [always get the same result everytime](learn/keeping-components-pure) you run that piece of code with the same inputs.
73+
Components must always return the same output with respect to their inputs – props, state, and context. This is known as _idempotency_. [Idempotency](https://en.wikipedia.org/wiki/Idempotence) is a term popularized in functional programming. It refers to the idea that you [always get the same result every time](learn/keeping-components-pure) you run that piece of code with the same inputs.
7474

7575
This means that _all_ code that runs [during render](#how-does-react-run-your-code) must also be idempotent in order for this rule to hold. For example, this line of code is not idempotent (and therefore, neither is the component):
7676

0 commit comments

Comments
 (0)