Created
November 6, 2020 18:47
-
-
Save aderbas/eaa1ae3445c9d51f6324b5d5b9e4ba63 to your computer and use it in GitHub Desktop.
VSCode ReactJS 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
{ | |
"Doc File": { | |
"prefix": "doc", | |
"body": [ | |
"/**", | |
" * File description...", | |
" * @author: Author Name <[email protected]>", | |
" * @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