Created
March 5, 2018 09:56
-
-
Save jpetitcolas/8f98107e1b256cd5094339bab4a498a7 to your computer and use it in GitHub Desktop.
React Functional Component Visual Code Snippet
This file contains hidden or 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
{ | |
"Create new functional component": { | |
"prefix": "_compo", | |
"body": [ | |
"import React from 'react';", | |
"import PropTypes from 'prop-types';", | |
"", | |
"export const $1 = ({$2}) => (", | |
" $3", | |
");", | |
"", | |
"$1.propTypes = {", | |
"};", | |
"", | |
"export default $1;", | |
], | |
"description": "Create a new functional React component" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment