Created
April 29, 2024 15:49
-
-
Save gthrm/2f753c8211d2a864e0cfb2f45ca28ebb to your computer and use it in GitHub Desktop.
react-functional-component-ts-folder-name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"react-functional-component-ts-folder-name": { | |
"prefix": "rfc", | |
"body": [ | |
"import React from 'react';", | |
"", | |
"interface ${TM_DIRECTORY/.*\\/(.*)$/$1/g}Props {", | |
" ${2:propName}?: string;", // Assuming the prop type is string for demonstration; adjust as necessary. | |
"}", | |
"", | |
"const ${TM_DIRECTORY/.*\\/(.*)$/$1/g}: React.FC<${TM_DIRECTORY/.*\\/(.*)$/$1/g}Props> = ({ ${2:propName} }) => {", | |
" return (", | |
" <></>", | |
" );", | |
"};", | |
"", | |
"export default ${TM_DIRECTORY/.*\\/(.*)$/$1/g};" | |
], | |
"description": "TypeScript react-functional-component" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment