Skip to content

Commit 61bf23a

Browse files
authored
FIX: Various typos across codebase :) (#5767)
1 parent 6b4aa49 commit 61bf23a

File tree

11 files changed

+22
-22
lines changed

11 files changed

+22
-22
lines changed

src/components/MDX/CodeBlock/CodeBlock.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {css} from '@codemirror/lang-css';
1010
import rangeParser from 'parse-numeric-range';
1111
import {CustomTheme} from '../Sandpack/Themes';
1212

13-
interface InlineHiglight {
13+
interface InlineHighlight {
1414
step: number;
1515
line: number;
1616
startColumn: number;
@@ -318,7 +318,7 @@ function getInlineDecorators(
318318
}
319319
const inlineHighlightLines = getInlineHighlights(meta, code);
320320
const inlineHighlightConfig = inlineHighlightLines.map(
321-
(line: InlineHiglight) => ({
321+
(line: InlineHighlight) => ({
322322
...line,
323323
elementAttributes: {'data-step': `${line.step}`},
324324
className: cn(
@@ -371,15 +371,15 @@ function getHighlightLines(meta: string): number[] {
371371
* -> The meta is `{1-3,7} [[1, 1, 'count', [2, 4, 'setCount']] App.js active`
372372
*/
373373
function getInlineHighlights(meta: string, code: string) {
374-
const INLINE_HIGHT_REGEX = /(\[\[.*\]\])/;
375-
const parsedMeta = INLINE_HIGHT_REGEX.exec(meta);
374+
const INLINE_HEIGHT_REGEX = /(\[\[.*\]\])/;
375+
const parsedMeta = INLINE_HEIGHT_REGEX.exec(meta);
376376
if (!parsedMeta) {
377377
return [];
378378
}
379379

380380
const lines = code.split('\n');
381-
const encodedHiglights = JSON.parse(parsedMeta[1]);
382-
return encodedHiglights.map(([step, lineNo, substr, fromIndex]: any[]) => {
381+
const encodedHighlights = JSON.parse(parsedMeta[1]);
382+
return encodedHighlights.map(([step, lineNo, substr, fromIndex]: any[]) => {
383383
const line = lines[lineNo - 1];
384384
let index = line.indexOf(substr);
385385
const lastIndex = line.lastIndexOf(substr);

src/content/learn/escape-hatches.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ Read **[Lifecycle of Reactive Events](/learn/lifecycle-of-reactive-effects)** to
314314

315315
<Wip>
316316

317-
This section describes an **experimental API that has not yet been released** in a stable vesion of React.
317+
This section describes an **experimental API that has not yet been released** in a stable version of React.
318318

319319
</Wip>
320320

src/content/learn/lifecycle-of-reactive-effects.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ body {
11871187
11881188
<Solution>
11891189
1190-
The problem with the original code was suppressing the dependency linter. If you remove the suppression, you'll see that this Effect depends on the `handleMove` function. This makes sense: `handleMove` is declared inside the component body, which makes it a reactive value. Every reactive value must be specified as a depedency, or it can potentially get stale over time!
1190+
The problem with the original code was suppressing the dependency linter. If you remove the suppression, you'll see that this Effect depends on the `handleMove` function. This makes sense: `handleMove` is declared inside the component body, which makes it a reactive value. Every reactive value must be specified as a dependency, or it can potentially get stale over time!
11911191
11921192
The author of the original code has "lied" to React by saying that the Effect does not depend (`[]`) on any reactive values. This is why React did not re-synchronize the Effect after `canMove` has changed (and `handleMove` with it). Because React did not re-synchronize the Effect, the `handleMove` attached as a listener is the `handleMove` function created during the initial render. During the initial render, `canMove` was `true`, which is why `handleMove` from the initial render will forever see that value.
11931193
@@ -1759,7 +1759,7 @@ async function fetchPlaces(planetId) {
17591759
id: 'vishniac',
17601760
name: 'Vishniac'
17611761
}]);
1762-
} else throw Error('Uknown planet ID: ' + planetId);
1762+
} else throw Error('Unknown planet ID: ' + planetId);
17631763
}, 1000);
17641764
});
17651765
}
@@ -1927,7 +1927,7 @@ async function fetchPlaces(planetId) {
19271927
id: 'vishniac',
19281928
name: 'Vishniac'
19291929
}]);
1930-
} else throw Error('Uknown planet ID: ' + planetId);
1930+
} else throw Error('Unknown planet ID: ' + planetId);
19311931
}, 1000);
19321932
});
19331933
}
@@ -2090,7 +2090,7 @@ async function fetchPlaces(planetId) {
20902090
id: 'vishniac',
20912091
name: 'Vishniac'
20922092
}]);
2093-
} else throw Error('Uknown planet ID: ' + planetId);
2093+
} else throw Error('Unknown planet ID: ' + planetId);
20942094
}, 1000);
20952095
});
20962096
}

src/content/learn/removing-effect-dependencies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ function ChatRoom({ roomId }) {
611611
612612
<Wip>
613613
614-
This section describes an **experimental API that has not yet been released** in a stable vesion of React.
614+
This section describes an **experimental API that has not yet been released** in a stable version of React.
615615
616616
</Wip>
617617
@@ -1611,7 +1611,7 @@ label, button { display: block; margin-bottom: 5px; }
16111611
16121612
Your Effect is re-running because it depends on the `options` object. Objects can be re-created unintentionally, you should try to avoid them as dependencies of your Effects whenever possible.
16131613
1614-
The least invasive fix is to read `roomId` and `serverUrl` right outside the Effect, and then make the Effect depend on those primitive values (which can't change unintentionally). Inside the Effect, create an object and it pass to `createConnnection`:
1614+
The least invasive fix is to read `roomId` and `serverUrl` right outside the Effect, and then make the Effect depend on those primitive values (which can't change unintentionally). Inside the Effect, create an object and it pass to `createConnection`:
16151615
16161616
<Sandpack>
16171617

src/content/learn/reusing-logic-with-custom-hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ Every time your `ChatRoom` component re-renders, it passes the latest `roomId` a
839839
840840
<Wip>
841841
842-
This section describes an **experimental API that has not yet been released** in a stable vesion of React.
842+
This section describes an **experimental API that has not yet been released** in a stable version of React.
843843
844844
</Wip>
845845

src/content/learn/separating-events-from-effects.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ You need a way to separate this non-reactive logic from the reactive Effect arou
402402
403403
<Wip>
404404
405-
This section describes an **experimental API that has not yet been released** in a stable vesion of React.
405+
This section describes an **experimental API that has not yet been released** in a stable version of React.
406406
407407
</Wip>
408408
@@ -580,7 +580,7 @@ You can think of Effect Events as being very similar to event handlers. The main
580580

581581
<Wip>
582582

583-
This section describes an **experimental API that has not yet been released** in a stable vesion of React.
583+
This section describes an **experimental API that has not yet been released** in a stable version of React.
584584

585585
</Wip>
586586

@@ -880,7 +880,7 @@ Read [Removing Effect Dependencies](/learn/removing-effect-dependencies) for oth
880880
881881
<Wip>
882882
883-
This section describes an **experimental API that has not yet been released** in a stable vesion of React.
883+
This section describes an **experimental API that has not yet been released** in a stable version of React.
884884
885885
</Wip>
886886

src/content/reference/react-dom/components/select.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If your `<select>` is uncontrolled, you may pass the `defaultValue` prop instead
4848

4949
* `defaultValue`: A string (or an array of strings for [`multiple={true}`](#enabling-multiple-selection)). Specifies [the initially selected option.](#providing-an-initially-selected-option)
5050

51-
These `<select>` props are relevant both for uncontrolled and controlled select boxs:
51+
These `<select>` props are relevant both for uncontrolled and controlled select boxes:
5252

5353
* [`autoComplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-autocomplete): A string. Specifies one of the possible [autocomplete behaviors.](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values)
5454
* [`autoFocus`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-autofocus): A boolean. If `true`, React will focus the element on mount.

src/content/reference/react-dom/createPortal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default function MyComponent() {
108108

109109
</Sandpack>
110110

111-
Notice how the second paragraph visually appears outside the parent `<div>` with the border. If you inspect the DOM structure with developer tools, you'll see that the second `<p>` got placed direcly into the `<body>`:
111+
Notice how the second paragraph visually appears outside the parent `<div>` with the border. If you inspect the DOM structure with developer tools, you'll see that the second `<p>` got placed directly into the `<body>`:
112112

113113
```html {4-6,9}
114114
<body>

src/content/reference/react-dom/server/renderToPipeableStream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ app.use('/', (request, response) => {
9292
});
9393
```
9494
95-
Along with the <CodeStep step={1}>root component</CodeStep>, you need to provide a list of <CodeStep step={2}>boostrap `<script>` paths</CodeStep>. Your root component should return **the entire document including the root `<html>` tag.**
95+
Along with the <CodeStep step={1}>root component</CodeStep>, you need to provide a list of <CodeStep step={2}>bootstrap `<script>` paths</CodeStep>. Your root component should return **the entire document including the root `<html>` tag.**
9696
9797
For example, it might look like this:
9898

src/content/reference/react-dom/server/renderToReadableStream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async function handler(request) {
9393
}
9494
```
9595
96-
Along with the <CodeStep step={1}>root component</CodeStep>, you need to provide a list of <CodeStep step={2}>boostrap `<script>` paths</CodeStep>. Your root component should return **the entire document including the root `<html>` tag.**
96+
Along with the <CodeStep step={1}>root component</CodeStep>, you need to provide a list of <CodeStep step={2}>bootstrap `<script>` paths</CodeStep>. Your root component should return **the entire document including the root `<html>` tag.**
9797
9898
For example, it might look like this:
9999

0 commit comments

Comments
 (0)