From c6353b9853116680ce51352872a3df1078eedee0 Mon Sep 17 00:00:00 2001 From: Strek Date: Thu, 25 Nov 2021 08:52:06 +0530 Subject: [PATCH 1/3] chore: fix typo (#4104) --- beta/src/pages/learn/adding-interactivity.md | 2 +- .../pages/learn/choosing-the-state-structure.md | 2 +- beta/src/pages/learn/index.md | 2 +- beta/src/pages/learn/rendering-lists.md | 2 +- beta/src/pages/learn/state-a-components-memory.md | 14 +++++++------- beta/src/pages/reference/usestate.md | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/beta/src/pages/learn/adding-interactivity.md b/beta/src/pages/learn/adding-interactivity.md index edaf459b4e..b296f16b38 100644 --- a/beta/src/pages/learn/adding-interactivity.md +++ b/beta/src/pages/learn/adding-interactivity.md @@ -181,7 +181,7 @@ export const sculptureList = [{ }, { name: 'Terracotta Army', artist: 'Unknown Artist', - description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consited of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', + description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consisted of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', url: 'https://i.imgur.com/HMFmH6m.jpg', alt: '12 terracotta sculptures of solemn warriors, each with a unique facial expression and armor.' }, { diff --git a/beta/src/pages/learn/choosing-the-state-structure.md b/beta/src/pages/learn/choosing-the-state-structure.md index 6c076496b0..c20b26ce14 100644 --- a/beta/src/pages/learn/choosing-the-state-structure.md +++ b/beta/src/pages/learn/choosing-the-state-structure.md @@ -2304,7 +2304,7 @@ Notice how the event handlers are only concerned with calling `setItems` after t ### Fix the disappearing selection {/*fix-the-disappearing-selection*/} -There is a list of `letters` in state. When you hover or focus a particular letter, it gets highlighted. The currently highlighted letter is stored in the `highlightedLetter` state variable. You can "star" and "unstar" invidual letters, which updates the `letters` array in state. +There is a list of `letters` in state. When you hover or focus a particular letter, it gets highlighted. The currently highlighted letter is stored in the `highlightedLetter` state variable. You can "star" and "unstar" individual letters, which updates the `letters` array in state. This code works, but there is a minor UI glitch. When you press "Star" or "Unstar", the highlighting disappears for a moment. However, it reappears as soon as you move your pointer or switch to another letter with keyboard. Why is this happening? Fix it so that the highlighting doesn't disappear after the button click. diff --git a/beta/src/pages/learn/index.md b/beta/src/pages/learn/index.md index 87662538ee..b0e1cb15ba 100644 --- a/beta/src/pages/learn/index.md +++ b/beta/src/pages/learn/index.md @@ -367,7 +367,7 @@ export const sculptureList = [{ }, { name: 'Terracotta Army', artist: 'Unknown Artist', - description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consited of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', + description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consisted of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', url: 'https://i.imgur.com/HMFmH6m.jpg', alt: '12 terracotta sculptures of solemn warriors, each with a unique facial expression and armor.' }, { diff --git a/beta/src/pages/learn/rendering-lists.md b/beta/src/pages/learn/rendering-lists.md index bad7a7d9b7..c3c83cb6df 100644 --- a/beta/src/pages/learn/rendering-lists.md +++ b/beta/src/pages/learn/rendering-lists.md @@ -401,7 +401,7 @@ Different sources of data provide different sources of keys: Imagine that files on your desktop didn't have names. Instead, you'd refer to them by their order -- the first file, the second file, and so on. You could get used to it, but once you delete a file, it would get confusing. The second file would become the first file, the third file would be the second file, and so on. -File names in a folder and JSX keys in an array serve a similar purpose. They let us uniquely identify an item between its siblings. A well-chosen key provides more information than the position within the array. Even if the _position_ changes due to reordering, the `key` lets React identify the item througout its lifetime. +File names in a folder and JSX keys in an array serve a similar purpose. They let us uniquely identify an item between its siblings. A well-chosen key provides more information than the position within the array. Even if the _position_ changes due to reordering, the `key` lets React identify the item throughout its lifetime. diff --git a/beta/src/pages/learn/state-a-components-memory.md b/beta/src/pages/learn/state-a-components-memory.md index fbd486c6e7..2b9dd40db3 100644 --- a/beta/src/pages/learn/state-a-components-memory.md +++ b/beta/src/pages/learn/state-a-components-memory.md @@ -110,7 +110,7 @@ export const sculptureList = [{ }, { name: 'Terracotta Army', artist: 'Unknown Artist', - description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consited of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', + description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consisted of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', url: 'https://i.imgur.com/HMFmH6m.jpg', alt: '12 terracotta sculptures of solemn warriors, each with a unique facial expression and armor.' }, { @@ -290,7 +290,7 @@ export const sculptureList = [{ }, { name: 'Terracotta Army', artist: 'Unknown Artist', - description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consited of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', + description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consisted of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', url: 'https://i.imgur.com/HMFmH6m.jpg', alt: '12 terracotta sculptures of solemn warriors, each with a unique facial expression and armor.' }, { @@ -475,7 +475,7 @@ export const sculptureList = [{ }, { name: 'Terracotta Army', artist: 'Unknown Artist', - description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consited of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', + description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consisted of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', url: 'https://i.imgur.com/HMFmH6m.jpg', alt: '12 terracotta sculptures of solemn warriors, each with a unique facial expression and armor.' }, { @@ -669,7 +669,7 @@ let sculptureList = [{ }, { name: 'Terracotta Army', artist: 'Unknown Artist', - description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consited of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', + description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consisted of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', url: 'https://i.imgur.com/HMFmH6m.jpg', alt: '12 terracotta sculptures of solemn warriors, each with a unique facial expression and armor.' }, { @@ -838,7 +838,7 @@ export const sculptureList = [{ }, { name: 'Terracotta Army', artist: 'Unknown Artist', - description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consited of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', + description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consisted of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', url: 'https://i.imgur.com/HMFmH6m.jpg', alt: '12 terracotta sculptures of solemn warriors, each with a unique facial expression and armor.' }, { @@ -1009,7 +1009,7 @@ export const sculptureList = [{ }, { name: 'Terracotta Army', artist: 'Unknown Artist', - description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consited of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', + description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consisted of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', url: 'https://i.imgur.com/HMFmH6m.jpg', alt: '12 terracotta sculptures of solemn warriors, each with a unique facial expression and armor.' }, { @@ -1171,7 +1171,7 @@ export const sculptureList = [{ }, { name: 'Terracotta Army', artist: 'Unknown Artist', - description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consited of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', + description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consisted of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', url: 'https://i.imgur.com/HMFmH6m.jpg', alt: '12 terracotta sculptures of solemn warriors, each with a unique facial expression and armor.' }, { diff --git a/beta/src/pages/reference/usestate.md b/beta/src/pages/reference/usestate.md index 360959dd42..0236ab7496 100644 --- a/beta/src/pages/reference/usestate.md +++ b/beta/src/pages/reference/usestate.md @@ -341,7 +341,7 @@ export const sculptureList = [{ }, { name: 'Terracotta Army', artist: 'Unknown Artist', - description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consited of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', + description: 'The Terracotta Army is a collection of terracotta sculptures depicting the armies of Qin Shi Huang, the first Emperor of China. The army consisted of more than 8,000 soldiers, 130 chariots with 520 horses, and 150 cavalry horses.', url: 'https://i.imgur.com/HMFmH6m.jpg', alt: '12 terracotta sculptures of solemn warriors, each with a unique facial expression and armor.' }, { From d8800be079645a78a2994abaac8a226c7c254ea8 Mon Sep 17 00:00:00 2001 From: Sofya Tuymedova Date: Thu, 25 Nov 2021 19:23:31 +0300 Subject: [PATCH 2/3] chore: fix typos (#4121) --- beta/src/pages/learn/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beta/src/pages/learn/index.md b/beta/src/pages/learn/index.md index b0e1cb15ba..0df815d1a6 100644 --- a/beta/src/pages/learn/index.md +++ b/beta/src/pages/learn/index.md @@ -178,7 +178,7 @@ img { margin: 0 10px 10px 0; height: 90px; } You might wonder why `className="avatar"` uses quotes but `src={imageUrl}` uses curly braces. In JSX, curly braces are like a ["window into JavaScript"](/learn/javascript-in-jsx-with-curly-braces). They let you run a bit of JavaScript right in your markup! So `src={imageUrl}` reads the `imageUrl` prop declared on the first line and passed from the parent `Gallery` component. -In the above example, all the data was written directly in markup. However, you'll often want to keep it separately. Here, the data is kept in an array. In React, you use JavaScript functions like [`map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) to [renders lists](/learn/rendering-lists) of things. +In the above example, all the data was written directly in markup. However, you'll often want to keep it separately. Here, the data is kept in an array. In React, you use JavaScript functions like [`map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) to [render lists](/learn/rendering-lists) of things. @@ -708,7 +708,7 @@ Read **[Managing State](/learn/managing-state)** to learn how to keep your compo ## Next steps {/*next-steps*/} -This page was fast-paced! If you've read this far, you have already seen 80% of React you will use on daily basis. +This page was fast-paced! If you've read this far, you have already seen 80% of React you will use on a daily basis. Your next steps depend on what you'd like to do: From 0057efa12c1aa2271ef80d7a84d622732bdfa85c Mon Sep 17 00:00:00 2001 From: Marek Bodinger <11184728+MarekBodinger@users.noreply.github.com> Date: Thu, 25 Nov 2021 17:46:18 +0100 Subject: [PATCH 3/3] Fix description to match code in referencing-values-with-refs.md (#4097) --- beta/src/pages/learn/referencing-values-with-refs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beta/src/pages/learn/referencing-values-with-refs.md b/beta/src/pages/learn/referencing-values-with-refs.md index 04d93e5bc0..3084dfc520 100644 --- a/beta/src/pages/learn/referencing-values-with-refs.md +++ b/beta/src/pages/learn/referencing-values-with-refs.md @@ -82,7 +82,7 @@ const [startTime, setStartTime] = useState(null); const [now, setNow] = useState(null); ``` -When the user presses "Start," you'll use [`setInterval`](https://developer.mozilla.org/docs/Web/API/setInterval) in order to update the time every 10 milliseconds: +When the user presses "Start," you'll use [`setInterval`](https://developer.mozilla.org/docs/Web/API/setInterval) in order to update the time every 100 milliseconds: @@ -656,4 +656,4 @@ export default function Chat() { - \ No newline at end of file +