Created
October 5, 2017 21:31
-
-
Save klzns/70a3369139f01eca24fce489187cc891 to your computer and use it in GitHub Desktop.
React Component Snippet
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 Component": { | |
"prefix": "reactComp", | |
"body": [ | |
"import React, { Component } from 'react'", | |
"import PropTypes from 'prop-types'", | |
"", | |
"class ${1:${TM_FILENAME/(.*)\\.js/${1:/capitalize}/}} extends Component {", | |
" render() {", | |
" return (", | |
" ${3}", | |
" )", | |
" }", | |
"}", | |
"", | |
"${1:${TM_FILENAME/(.*)\\.js/${1:/capitalize}/}}.propTypes = {", | |
" ${2}", | |
"}", | |
"", | |
"export default ${1:${TM_FILENAME/(.*)\\.js/${1:/capitalize}/}}" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
VsCode:
Code > Preferences > User snippet > javascript
Paste code, save and reload VsCode