Skip to content

Instantly share code, notes, and snippets.

@ozluy
Created December 10, 2018 10:08
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 ozluy/1232cd29e24fb5d6ea3160cbc40a02ab to your computer and use it in GitHub Desktop.
Save ozluy/1232cd29e24fb5d6ea3160cbc40a02ab to your computer and use it in GitHub Desktop.
User Snippet for VS Code
{
"reactFunctionalComponentWithPropTypesESLinted": {
"prefix": "rfc",
"body": [
"import React from 'react'",
"import { Wrapper } from './styled'",
"",
"const ${1:${TM_FILENAME_BASE}} = () => (",
" <Wrapper>",
" $0",
" </Wrapper>",
")",
"",
"export default ${1:${TM_FILENAME_BASE}}",
"",
""
],
"description": "Creates a React Functional Component with ES7 module system with PropTypes"
},
"styledComponent": {
"prefix": "styled",
"body": [
"import styled from 'styled-components'",
"",
"export const Wrapper = styled.div``",
"",
""
],
"description": "Creates a Styled Components"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment