Skip to content

Instantly share code, notes, and snippets.

@JonathonRichardson
Created November 30, 2022 19:32
Show Gist options
  • Save JonathonRichardson/a53006da4b4b82b0a26313c0bab7fed9 to your computer and use it in GitHub Desktop.
Save JonathonRichardson/a53006da4b4b82b0a26313c0bab7fed9 to your computer and use it in GitHub Desktop.
{
"Function Component": {
"prefix": ["component.fn"],
"body": [
"// #region imports",
"import * as React from \"react\"",
"// #endregion imports",
"",
"interface IProps { /* eslint-disable-line @typescript-eslint/no-empty-interface */ /* prettier-ignore */ } ",
"",
"/* eslint-disable-next-line @typescript-eslint/no-unused-vars */",
"export const $1: React.FunctionComponent<IProps> = (props) => {",
" return (<></>);",
"};"
],
"description": "A basic functional component",
"scope": "typescriptreact"
},
"Imports Region": {
"prefix": ["imports.region"],
"body": ["// #region imports", "import {} from \"$1\"", "// #endregion imports"],
"description": "Colapsible Imports Region",
"scope": "typescript"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment