From 375d2ec784342ae223fd668a8bd5492feb1e0c1f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 22 Jun 2026 17:09:44 +0000 Subject: [PATCH] docs: fix curly quotes around Mirroring on state structure page Fixes reactjs/react.dev#7913 Replace straight ASCII quotes with proper opening and closing curly quotes so the smartypants typography plugin renders them correctly. --- src/content/learn/choosing-the-state-structure.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/learn/choosing-the-state-structure.md b/src/content/learn/choosing-the-state-structure.md index 2533a53d85d..baf5c80be6e 100644 --- a/src/content/learn/choosing-the-state-structure.md +++ b/src/content/learn/choosing-the-state-structure.md @@ -355,7 +355,7 @@ function Message({ messageColor }) { Here, a `color` state variable is initialized to the `messageColor` prop. The problem is that **if the parent component passes a different value of `messageColor` later (for example, `'red'` instead of `'blue'`), the `color` *state variable* would not be updated!** The state is only initialized during the first render. -This is why "mirroring" some prop in a state variable can lead to confusion. Instead, use the `messageColor` prop directly in your code. If you want to give it a shorter name, use a constant: +This is why “mirroring” some prop in a state variable can lead to confusion. Instead, use the `messageColor` prop directly in your code. If you want to give it a shorter name, use a constant: ```js function Message({ messageColor }) { @@ -364,7 +364,7 @@ function Message({ messageColor }) { This way it won't get out of sync with the prop passed from the parent component. -"Mirroring" props into state only makes sense when you *want* to ignore all updates for a specific prop. By convention, start the prop name with `initial` or `default` to clarify that its new values are ignored: +“Mirroring” props into state only makes sense when you *want* to ignore all updates for a specific prop. By convention, start the prop name with `initial` or `default` to clarify that its new values are ignored: ```js function Message({ initialColor }) {