Skip to content

Conversation

SarthakC
Copy link

@SarthakC SarthakC commented Apr 6, 2021

resolves #175

"}",
"",
"const ${1:${TM_FILENAME_BASE}} = (props: Props) => {",
"const ${1:${TM_FILENAME_BASE}}:React.FC<Props> = (props) => {",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, React.FC has some additional props. Sometimes they are not suitable:

 interface FunctionComponent<P = {}> { (props: PropsWithChildren<P>, context?: any): ReactElement<any, any> | null; propTypes?: WeakValidationMap<P>; contextTypes?: ValidationMap<any>; defaultProps?: Partial<P>; displayName?: string; } 

Better leave it as is but add a return value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants