Skip to content

Instantly share code, notes, and snippets.

@aderbas
Created November 6, 2020 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aderbas/eaa1ae3445c9d51f6324b5d5b9e4ba63 to your computer and use it in GitHub Desktop.
Save aderbas/eaa1ae3445c9d51f6324b5d5b9e4ba63 to your computer and use it in GitHub Desktop.
VSCode ReactJS Snippets
{
"Doc File": {
"prefix": "doc",
"body": [
"/**",
" * File description...",
" * @author: Author Name <author@email.com>",
" * @since: $CURRENT_DATE/$CURRENT_MONTH/$CURRENT_YEAR",
" *",
" * Copyright $CURRENT_YEAR.",
" */"
]
},
"React PureComponent": {
"prefix": "react-purecomponent",
"body": [
"import React from 'react';",
"",
"class ClassName extends React.PureComponent {",
"",
" render() {",
" return (<React.Fragment>TODO</React.Fragment>)",
" }",
"}",
"export default ClassName"
]
},
"React Component": {
"prefix": "react-component",
"body": [
"import React from 'react';",
"",
"class ClassName extends React.Component {",
"",
" render() {",
" return (<React.Fragment>TODO</React.Fragment>)",
" }",
"}",
"export default ClassName"
]
},
"React Function Component": {
"prefix": "react-function",
"body": [
"/**",
" * Doc...",
" */",
"export const FunctionName = ({...props}) => {",
" return (<div>TODO</div>)",
"}"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment