From 2b1a30a7d582808e7f1834a545ce0cdc7c4d0e1c Mon Sep 17 00:00:00 2001 From: maurer2 <6861911+maurer2@users.noreply.github.com> Date: Sun, 1 May 2022 22:35:51 +0100 Subject: [PATCH] Remove VFC recommendation The VFC must have gotten in there somehow. Thanks to https://github.com/typescript-cheatsheets/react/pull/499#issuecomment-1112921526 --- 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 1f841b8d..46d27516 100644 --- a/docs/basic/getting-started/function-components.md +++ b/docs/basic/getting-started/function-components.md @@ -61,7 +61,7 @@ const Title: React.FunctionComponent<{ title: string }> = ({ In [@types/react 16.9.48](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46643), the `React.VoidFunctionComponent` or `React.VFC` type was added for typing `children` explicitly. However, please be aware that `React.VFC` and `React.VoidFunctionComponent` were deprecated in React 18 (https://github.com/DefinitelyTyped/DefinitelyTyped/pull/59882), so this interim solution is no longer necessary or recommended in React 18+. -Please use regular function components or `React.VFC` instead. +Please use regular function components or `React.FC` instead. ```ts type Props = { foo: string };