wix-incubator / vscode-glean

The extension provides refactoring tools for your React codebase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SFC is deprecated in @types/react

JoshuaKGoldberg opened this issue · comments

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?

@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

Perfect :) thanks!