Skip to content

Instantly share code, notes, and snippets.

@avilde
Last active June 4, 2020 06:54
Show Gist options
  • Save avilde/203ad8253c4897b7fe54a276cc6d868f to your computer and use it in GitHub Desktop.
Save avilde/203ad8253c4897b7fe54a276cc6d868f to your computer and use it in GitHub Desktop.
New React Typescript Functional Component Template
{
"New React FC": {
"prefix": "nfc",
"body": [
"import React from 'react';",
"import classes from './${1}.module.scss';",
"",
"interface ${1}Props {}",
"",
"const ${1} = (props: ${1}Props) => {",
"\t return <div className={classes.${1}}></div>;",
"}",
"",
"export default ${1};"
],
"description": "Create new React functional component with Typescript interface"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment