Skip to content

Instantly share code, notes, and snippets.

@wschenkel
Created June 3, 2020 02:43
Show Gist options
  • Save wschenkel/9cfcb40630441042f1612a863244c70a to your computer and use it in GitHub Desktop.
Save wschenkel/9cfcb40630441042f1612a863244c70a to your computer and use it in GitHub Desktop.
Vscode Snippets
{
"React Function stateful Component": {
"prefix": "rc",
"body": [
"import React, { useState } from 'react';",
"import Proptypes from 'prop-types';",
"",
"export default function ${TM_DIRECTORY/^.+\\\\/(.*)$/$1/}() {",
" const [state, setState] = useState(null);",
"",
" return (<>Component</>);",
"}",
"",
"${TM_DIRECTORY/^.+\\\\/(.*)$/$1/}.propTypes = {};"
],
"description": "React Function stateful Component"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment