Skip to content

Instantly share code, notes, and snippets.

@fzed51
Last active May 16, 2025 11:56
Show Gist options
  • Save fzed51/580ce6d60702d22d477476f148b10ada to your computer and use it in GitHub Desktop.
Save fzed51/580ce6d60702d22d477476f148b10ada to your computer and use it in GitHub Desktop.
snippets for vscode
{
"React Component": {
"prefix": "rc",
"body": [
"interface ${1:${RELATIVE_FILEPATH/.+[\\\/]([^\\\/]+)(?:\\\/index\\.tsx$)|.+[\\\/]([^\\\/]+)\\.tsx$/${1:/pascalcase}${2:/pascalcase}/}}Props { $2}",
"",
"export function ${1}({ $3}: ${1}Props) {",
" return (<>${4:${1}}</>);",
"}",
"",
"export default ${1};",
"",
],
"description": "Crée un composant React fonctionnel en TypeScript avec nom du dossier"
},
}

SNIPPETS FOR VSCODE

Installation

workspace

copier les fichier [lang].code-snippets dans le dossier .vscode

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