react-sortable-hoc icon indicating copy to clipboard operation
react-sortable-hoc copied to clipboard

Type mistake For "React.FC"

Open tarnishablec opened this issue 3 years ago • 1 comments

https://github.com/clauderic/react-sortable-hoc/blob/caf3c4f5bfb30894639391ae75c1bfc2b707a127/types/index.d.ts#L108

React.SFC is now deprecated

tarnishablec avatar Sep 15 '22 07:09 tarnishablec

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

ronparkdev avatar Sep 28 '22 05:09 ronparkdev