From 8674961f47343fccee3f264f2bd9db5ae81d8733 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Mon, 25 Nov 2024 19:37:07 +0100 Subject: [PATCH 1/2] Fix "Controlling stylesheet precedence" example --- src/content/reference/react-dom/components/link.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/content/reference/react-dom/components/link.md b/src/content/reference/react-dom/components/link.md index 730d9e995bd..63d08cc2ac8 100644 --- a/src/content/reference/react-dom/components/link.md +++ b/src/content/reference/react-dom/components/link.md @@ -158,9 +158,8 @@ export default function SiteMapPage() { ### Controlling stylesheet precedence {/*controlling-stylesheet-precedence*/} -Stylesheets can conflict with each other, and when they do, the browser goes with the one that comes later in the document. React lets you control the order of stylesheets with the `precedence` prop. In this example, two components render stylesheets, and the one with the higher precedence goes later in the document even though the component that renders it comes earlier. +Stylesheets can conflict with each other, and when they do, the browser goes with the one that comes later in the document. React lets you control the order of stylesheets with the `precedence` prop. In this example, three components render stylesheets, and the one with a `precedence` value that was discovered earlier goes earlier in the document even though a component that renders it comes later. -{/*FIXME: this doesn't appear to actually work -- I guess precedence isn't implemented yet?*/} @@ -172,6 +171,7 @@ export default function HomePage() { + ... ); @@ -185,6 +185,10 @@ function SecondComponent() { return ; } +function ThirdComponent() { + return ; +} + ``` From 35ef2eab15f526fae54f0547b936da3cb549c3eb Mon Sep 17 00:00:00 2001 From: "Sebastian \"Sebbie\" Silbermann" Date: Wed, 27 Nov 2024 14:41:26 +0100 Subject: [PATCH 2/2] Update src/content/reference/react-dom/components/link.md Co-authored-by: Strek --- src/content/reference/react-dom/components/link.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react-dom/components/link.md b/src/content/reference/react-dom/components/link.md index 63d08cc2ac8..b4696d3453f 100644 --- a/src/content/reference/react-dom/components/link.md +++ b/src/content/reference/react-dom/components/link.md @@ -186,7 +186,7 @@ function SecondComponent() { } function ThirdComponent() { - return ; + return ; } ```