Created
June 3, 2020 02:43
-
-
Save wschenkel/9cfcb40630441042f1612a863244c70a to your computer and use it in GitHub Desktop.
Vscode Snippets
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
Show hidden characters
{ | |
"React Function stateful Component": { | |
"prefix": "rc", | |
"body": [ | |
"import React, { useState } from 'react';", | |
"import Proptypes from 'prop-types';", | |
"", | |
"export default function ${TM_DIRECTORY/^.+\\\\/(.*)$/$1/}() {", | |
" const [state, setState] = useState(null);", | |
"", | |
" return (<>Component</>);", | |
"}", | |
"", | |
"${TM_DIRECTORY/^.+\\\\/(.*)$/$1/}.propTypes = {};" | |
], | |
"description": "React Function stateful Component" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment