Skip to content

Instantly share code, notes, and snippets.

@stinaq
Last active February 15, 2018 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stinaq/a6adb0a5a960b3f39b0b5227446261e3 to your computer and use it in GitHub Desktop.
Save stinaq/a6adb0a5a960b3f39b0b5227446261e3 to your computer and use it in GitHub Desktop.
React snippet stateless functional component with flow
{
// Place your global snippets here.
"React stateless flow component": {
"scope": "javascript,typescript,babel",
"prefix": "reactslf",
"body": [
"// @flow\nimport React from 'react';\n",
"type PropTypes = {",
" $0someProp: string",
"}\n",
"const ${1:Name of the component} = ({ someProp }: PropTypes) => (",
" <div>\n </div>);\n",
"export default ${1:Name of the component};"
],
"description": "Create a stateless functional React component with flow"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment