Descripción
Functional component with typed props in TypeScript
File Template: ❌
Prefix
rfc:props
Scopes
typescriptreact
Snippet de código
import React from 'react';
interface ${1:ComponentName}Props {
${2:propName}: ${3:string};
}
const ${1:ComponentName}: React.FC<${1:ComponentName}Props> = ({ ${2:propName} }) => {
return (
<div>
$0
</div>
);
};
export default $1;