Skip to content

Instantly share code, notes, and snippets.

@fes300
Last active October 16, 2018 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fes300/f379b77ab455092fcccfae69d6218de0 to your computer and use it in GitHub Desktop.
Save fes300/f379b77ab455092fcccfae69d6218de0 to your computer and use it in GitHub Desktop.
snippet for VSCode
{
"Create basic React class": {
"prefix": "rcc",
"body": [
"import * as React from 'react'",
"",
"type Props = {}",
"",
"type State = {}",
"",
"class ${1:${TM_FILENAME_BASE}} extends React.Component<Props, State> {",
"\trender() {",
"\t\treturn (",
"\t\t\t${2:<>}",
"\t\t)",
"\t}",
"}",
"",
"export default ${1:${TM_FILENAME_BASE}}"
],
"description": "Creates a basic React Class with the name of the current file."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment