Skip to content

Commit fff5f1e

Browse files
docs: fix 'it's' to 'its' typo in TypeScript guide
Fix possessive pronoun typo in the useContext typing section. 'it's' (contraction of 'it is') should be 'its' (possessive). Co-Authored-By: Ian Alloway <adapter_burners.1y@icloud.com>
1 parent 1b0bb73 commit fff5f1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/learn/typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ export default App = AppTSX;
286286

287287
This technique works when you have a default value which makes sense - but there are occasionally cases when you do not, and in those cases `null` can feel reasonable as a default value. However, to allow the type-system to understand your code, you need to explicitly set `ContextShape | null` on the `createContext`.
288288

289-
This causes the issue that you need to eliminate the `| null` in the type for context consumers. Our recommendation is to have the Hook do a runtime check for it's existence and throw an error when not present:
289+
This causes the issue that you need to eliminate the `| null` in the type for context consumers. Our recommendation is to have the Hook do a runtime check for its existence and throw an error when not present:
290290

291291
```js {5, 16-20}
292292
import { createContext, useContext, useState, useMemo } from 'react';

0 commit comments

Comments
 (0)