Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MechaKnightz/61d0635d44d4c8d1df0a700d0879d36d to your computer and use it in GitHub Desktop.
Save MechaKnightz/61d0635d44d4c8d1df0a700d0879d36d to your computer and use it in GitHub Desktop.
react.code-snippets
{
"React Functional Component": {
"prefix": "rfc",
"body": [
"import React from \"react\"",
"",
"const ${1:name} = (props) => {",
" return (",
" <div>",
" $2",
" </div>",
" )",
"};",
"",
"export default ${1:name};",
""
],
"description": "React Functional Component"
},
"React Typed Functional Component": {
"prefix": "rtc",
"body": [
"import { FC } from \"react\"",
"",
"type ${1:name}Props = {",
"",
"};",
"",
"const ${1:name}: FC<${1:name}Props> = ({}) => {",
" return (",
" <div>",
" $2",
" </div>",
" )",
"};",
"",
"export { ${1:name} };",
""
],
"description": "React Functional Component"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment