Skip to content

Instantly share code, notes, and snippets.

@skobba
Created December 17, 2020 14:26
Show Gist options
  • Select an option

  • Save skobba/72e576027e1aaf392b791d15096eea3e to your computer and use it in GitHub Desktop.

Select an option

Save skobba/72e576027e1aaf392b791d15096eea3e to your computer and use it in GitHub Desktop.
VS Code Snippets
{
"RFCTD": {
"prefix": "gsrfctr",
"body": [
"import * as React from 'react';",
"",
"interface FooterProps {",
" name: string;",
"}",
"",
"export default (({ name }) => {",
" return <h1>{name}</h1>;",
"}) as React.SFC<FooterProps>;",
""
],
"description": "RFCTD"
},
"React.FC": {
"prefix": "gsrfc",
"body": [
"import * as React from 'react';",
"",
"interface WelcomeProps {",
" name: string;",
"}",
"",
"export const Welcome: React.FC<WelcomeProps> = ({ name }) => {",
" return <h1>Hello! {name}</h1>;",
"};",
""
],
"description": "React.FC"
},
"console.log": {
"prefix": "cl",
"body": [
"console.log($1)"
],
"description": "console.log"
},
"console.log.stringify": {
"prefix": "clst",
"body": [
"console.log(JSON.stringify($1, null, 2))"
],
"description": "console.log"
},
"pre.stringify": {
"prefix": "prest",
"body": [
"<pre>{JSON.stringify($1, null, 2)}</pre>"
],
"description": "console.log"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment