Skip to content

Commit 4d44950

Browse files
Fix: typo in context.md file (typescript-cheatsheets#680)
* Typo fixed in context.md file * README.md generated
1 parent d768951 commit 4d44950

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ const MyComponent = () => {
15321532
};
15331533
```
15341534

1535-
However, it would be preferrable to not have to check for `null`, since we know that the context won't be `null`. One way to do that is to provide a custom hook to use the context, where an error is thrown if the context is not provided:
1535+
However, it would be preferable to not have to check for `null`, since we know that the context won't be `null`. One way to do that is to provide a custom hook to use the context, where an error is thrown if the context is not provided:
15361536

15371537
```tsx
15381538
import { createContext } from "react";

docs/basic/getting-started/context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const MyComponent = () => {
8383
};
8484
```
8585

86-
However, it would be preferrable to not have to check for `null`, since we know that the context won't be `null`. One way to do that is to provide a custom hook to use the context, where an error is thrown if the context is not provided:
86+
However, it would be preferable to not have to check for `null`, since we know that the context won't be `null`. One way to do that is to provide a custom hook to use the context, where an error is thrown if the context is not provided:
8787

8888
```tsx
8989
import { createContext } from "react";

0 commit comments

Comments
 (0)