Skip to content

Instantly share code, notes, and snippets.

@wunnle
Created April 29, 2020 06:24
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wunnle/0778103ad015024f17e6667f1d913b73 to your computer and use it in GitHub Desktop.
Save wunnle/0778103ad015024f17e6667f1d913b73 to your computer and use it in GitHub Desktop.
vscode react snippets
"import React": {
"prefix": "imr",
"body": [
"import React from 'react' \n \n"
]
},
"functional component": {
"prefix": "sfc",
"body": [
"import React from 'react' \n",
"const $1 = () => {",
"return ('hey')",
"}",
"\n",
"export default $1"
]
},
"component": {
"prefix": "fc",
"body": [
"import React from 'react'",
"import styles from './$1.module.scss' \n",
"const $1 = () => (",
"<div>hey</div>",
")",
"\n",
"export default $1"
]
},
"propTypes": {
"prefix": "pt",
"body": [
"import PropTypes from 'prop-types'"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment