Last active
October 26, 2020 21:56
-
-
Save agneym/ae6e3d55202689392ad4b8b6e1ea2c55 to your computer and use it in GitHub Desktop.
VS Code JSX Snippets
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
{ | |
"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