clauderic / react-sortable-hoc

A set of higher-order components to turn any list into an animated, accessible and touch-friendly sortable list✌️
https://clauderic.github.io/react-sortable-hoc/
MIT License
10.77k stars 978 forks source link

Type mistake For "React.FC" #855

Open tarnishablec opened 1 year ago

tarnishablec commented 1 year ago

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

React.SFC is now deprecated

ronparkdev commented 1 year ago

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