Skip to content

Commit

Permalink
feat: add information about change in React typing (#496)
Browse files Browse the repository at this point in the history
* feat: add information about change in React typing

See DefinitelyTyped/DefinitelyTyped#56210.

* chore: change wording
  • Loading branch information
filiptammergard committed Apr 19, 2022
1 parent 06129e0 commit 5da61d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/basic/getting-started/function-components.md
Expand Up @@ -45,7 +45,7 @@ Some differences from the "normal function" version:

- Note that there are some known issues using `defaultProps` with `React.FunctionComponent`. See [this issue for details](https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/issues/87). We maintain a separate `defaultProps` section you can also look up.

- It provides an implicit definition of `children` (see below) - however there are some issues with the implicit `children` type (e.g. [DefinitelyTyped#33006](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/33006)), and it might be better to be explicit about components that consume `children`, anyway.
- It provides an implicit definition of `children` (see below) - however there are some issues with the implicit `children` type (e.g. [DefinitelyTyped#33006](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/33006)), and it might be better to be explicit about components that consume `children`, anyway. With the [React 18 type updates](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210), `children` is no longer implicitly defined.

```tsx
const Title: React.FunctionComponent<{ title: string }> = ({
Expand Down

0 comments on commit 5da61d6

Please sign in to comment.