Last active
February 15, 2018 14:43
-
-
Save stinaq/a6adb0a5a960b3f39b0b5227446261e3 to your computer and use it in GitHub Desktop.
React snippet stateless functional component with flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 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