Created
February 24, 2019 17:33
-
-
Save maxboeck/0c8cd3753fecaf1a30db870663bfe81c to your computer and use it in GitHub Desktop.
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
{ | |
"Create a stateless React component": { | |
"prefix": "scomp", | |
"description": "A stateless component", | |
"body": [ | |
"import React from 'react'", | |
"import PropTypes from 'prop-types'", | |
"\nconst $1 = props => {", | |
"\treturn (", | |
"\t\t$0", | |
"\t)", | |
"}", | |
"\n$1.propTypes = {}", | |
"\nexport default $1" | |
] | |
}, | |
"Create a React component": { | |
"prefix": "comp", | |
"description": "A React component", | |
"body": [ | |
"import React from 'react'", | |
"import PropTypes from 'prop-types'", | |
"\nclass $1 extends React.Component {", | |
"\trender() {", | |
"\t\treturn (", | |
"\t\t\t$0", | |
"\t\t)", | |
"\t}", | |
"}", | |
"\n$1.propTypes = {}", | |
"\nexport default $1" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment