Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type mistake For "React.FC" #855

Open
tarnishablec opened this issue Sep 15, 2022 · 1 comment
Open

Type mistake For "React.FC" #855

tarnishablec opened this issue Sep 15, 2022 · 1 comment

Comments

@tarnishablec
Copy link

tarnishablec commented Sep 15, 2022

| React.SFC<P>

React.SFC is now deprecated

@ronparkdev
Copy link

Yes, It should modify to | React.FC<P>

    /**
     * @deprecated as of recent React versions, function components can no
     * longer be considered 'stateless'. Please use `FunctionComponent` instead.
     *
     * @see [React Hooks](https://reactjs.org/docs/hooks-intro.html)
     */
    type SFC<P = {}> = FunctionComponent<P>;

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a51e3613b44c4ae400d040592bb4f56fd3fa8a4f/types/react/index.d.ts#L528-L534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants