Skip to content

Instantly share code, notes, and snippets.

@danielhusar
Created June 12, 2020 00:55
Show Gist options
  • Save danielhusar/57d961f54d1ee218101c39004d483822 to your computer and use it in GitHub Desktop.
Save danielhusar/57d961f54d1ee218101c39004d483822 to your computer and use it in GitHub Desktop.
Vs code snippets
{
"rc": {
"prefix": "rc",
"body": [
"import React from 'react'",
"",
"interface ${1:${TM_FILENAME_BASE/((^[a-z])|[-,_]([a-z]))/${2:/upcase}${3:/upcase}/g}}Props {",
" $3",
"}",
"",
"export default function $1(props: $1Props) {",
" return $2",
"}",
],
"description": "React component"
},
"rcc": {
"prefix": "rcc",
"body": [
"import React ${4} from 'react'",
"",
"interface ${1:${TM_FILENAME_BASE/((^[a-z])|[-,_]([a-z]))/${2:/upcase}${3:/upcase}/g}}Props {",
" children: React.ReactNode",
" $3",
"}",
"",
"export default function $1({ children }: $1Props) {",
" return <>$2{children}</>",
"}",
],
"description": "React component"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment