wix-incubator / vscode-glean

The extension provides refactoring tools for your React codebase
MIT License
1.46k stars 56 forks source link

SFC is deprecated in @types/react #121

Closed JoshuaKGoldberg closed 3 years ago

JoshuaKGoldberg commented 3 years ago

Hi, thanks for this really useful extension! From the @deprecated tag on React.SFC:

@deprecated
as of recent React versions, function components can no longer be considered 'stateless'.
Please use FunctionComponent instead.

Personally, I've found FC used as React.FC to be a more succinct form. Would you accept a PR changing the import?

borislit commented 3 years ago

@JoshuaKGoldberg hey! The new version (just released) auto detects the version of react you are using, and will use FC for newer version. Tell me if the issue is resolved for you

JoshuaKGoldberg commented 3 years ago

Perfect :) thanks!