From 712556c0ec73bfbb687d2777777975b404aa3cb7 Mon Sep 17 00:00:00 2001 From: lauren Date: Tue, 2 Apr 2024 19:55:45 -0400 Subject: [PATCH 1/2] Fix inconsistent link underline on hover (#6731) Noticed this randomly and couldn't unsee it, so here's a quick PR to fix. --- src/components/MDX/TeamMember.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/MDX/TeamMember.tsx b/src/components/MDX/TeamMember.tsx index c9e83ebc6..eaf74187e 100644 --- a/src/components/MDX/TeamMember.tsx +++ b/src/components/MDX/TeamMember.tsx @@ -68,7 +68,7 @@ export function TeamMember({ + className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center"> {twitter} @@ -90,7 +90,7 @@ export function TeamMember({ + className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center"> {github} @@ -99,7 +99,7 @@ export function TeamMember({ + className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center"> {personal} )} From 93177e6ceac8ffb5c2a8f3ed4bd1f80b63097078 Mon Sep 17 00:00:00 2001 From: Siarhei Bobryk Date: Sat, 6 Apr 2024 11:35:00 +0200 Subject: [PATCH 2/2] fix(rules-of-react): "everytime" -> "every time" (#6737) --- .../reference/rules/components-and-hooks-must-be-pure.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/reference/rules/components-and-hooks-must-be-pure.md b/src/content/reference/rules/components-and-hooks-must-be-pure.md index 686006396..733597c63 100644 --- a/src/content/reference/rules/components-and-hooks-must-be-pure.md +++ b/src/content/reference/rules/components-and-hooks-must-be-pure.md @@ -16,7 +16,7 @@ This reference page covers advanced topics and requires familiarity with the con One of the key concepts that makes React, _React_ is _purity_. A pure component or hook is one that is: -* **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. +* **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. * **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. * **Does not mutate non-local values**: Components and Hooks should [never modify values that aren't created locally](#mutation) in render. @@ -70,7 +70,7 @@ function Dropdown() { ## Components and Hooks must be idempotent {/*components-and-hooks-must-be-idempotent*/} -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. +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. 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):