Created
May 25, 2024 00:11
-
-
Save MechaKnightz/61d0635d44d4c8d1df0a700d0879d36d to your computer and use it in GitHub Desktop.
react.code-snippets
This file contains 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": { | |
"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