Fix punctuation. (#6815)

* Update typescript.md

Fix punctuation.

* Update src/content/learn/typescript.md

---------

Co-authored-by: Ricky <rickhanlonii@gmail.com>
This commit is contained in:
E
2024-04-29 22:42:35 -04:00
committed by GitHub
parent 86d306f6ce
commit 6d0aca18d5

View File

@@ -137,7 +137,7 @@ The [`useState` Hook](/reference/react/useState) will re-use the value passed in
const [enabled, setEnabled] = useState(false);
```
Will assign the type of `boolean` to `enabled`, and `setEnabled` will be a function accepting either a `boolean` argument, or a function that returns a `boolean`. If you want to explicitly provide a type for the state, you can do so by providing a type argument to the `useState` call:
This will assign the type of `boolean` to `enabled`, and `setEnabled` will be a function accepting either a `boolean` argument, or a function that returns a `boolean`. If you want to explicitly provide a type for the state, you can do so by providing a type argument to the `useState` call:
```ts
// Explicitly set the type to "boolean"