Skip to content

Instantly share code, notes, and snippets.

@agneym
Last active October 26, 2020 21:56
Show Gist options
  • Save agneym/ae6e3d55202689392ad4b8b6e1ea2c55 to your computer and use it in GitHub Desktop.
Save agneym/ae6e3d55202689392ad4b8b6e1ea2c55 to your computer and use it in GitHub Desktop.
VS Code JSX Snippets
{
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');"
],
"description": "Log output to console"
},
"Functional React Component": {
"prefix": "rfc",
"body": [
"function ${TM_FILENAME_BASE}() {",
" return (",
" <p>$0${TM_FILENAME_BASE}</p>",
" );",
"}",
"",
"export default ${TM_FILENAME_BASE};",
"",
""
],
"description": "Functional React Component"
},
"Use Effect Hook": {
"prefix": "ue",
"body": [
"useEffect(() => {",
" $0",
"}, []);"
],
"description": "useEffect on mount"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment