From 36777d69b6f278adf6e559052b304d23ab3a562f Mon Sep 17 00:00:00 2001 From: Dascal Cosmin Date: Tue, 19 Apr 2022 23:59:58 +0200 Subject: [PATCH] feat: add information about change in React typing (#496) * feat: add information about change in React typing See https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210. * chore: change wording --- docs/basic/getting-started/function-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/basic/getting-started/function-components.md b/docs/basic/getting-started/function-components.md index 659aedb..b779996 100644 --- a/docs/basic/getting-started/function-components.md +++ b/docs/basic/getting-started/function-components.md @@ -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 }> = ({