Skip to content

Commit

Permalink
🤖 Merge PR #59882 [react] Deprecate VoidFunctionComponent and VFC…
Browse files Browse the repository at this point in the history
… by @eps1lon

* [react] Deprecate `VoidFunctionComponent` and `VFC`

* f
  • Loading branch information
eps1lon committed Apr 13, 2022
1 parent a574bec commit 8ce2499
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions types/react/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,14 @@ declare namespace React {
displayName?: string | undefined;
}

/**
* @deprecated - Equivalent with `React.FC`.
*/
type VFC<P = {}> = VoidFunctionComponent<P>;

/**
* @deprecated - Equivalent with `React.FunctionComponent`.
*/
interface VoidFunctionComponent<P = {}> {
(props: P, context?: any): ReactElement<any, any> | null;
propTypes?: WeakValidationMap<P> | undefined;
Expand Down

0 comments on commit 8ce2499

Please sign in to comment.