React Component Snippet
{ | |
"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}/}}" | |
] | |
} | |
} |
This comment has been minimized.
This comment has been minimized.
VsCode: Paste code, save and reload VsCode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
NICE WORK, for atom you can add the above snippet on
~/.atom/snippets.cson
with the following syntax: