Skip to content

Instantly share code, notes, and snippets.

@MarcoNicolodi
Last active April 17, 2018 17:00
Show Gist options
  • Save MarcoNicolodi/6b5cc35e4b0f6d4fa3fbcafe66096c7b to your computer and use it in GitHub Desktop.
Save MarcoNicolodi/6b5cc35e4b0f6d4fa3fbcafe66096c7b to your computer and use it in GitHub Desktop.
React code snippets
"Enzyme boilerplate" : {
"prefix": "enzyme boilerplate",
"body": [
"import React from 'react';",
"import { shallow } from 'enzyme';",
"import ${1: component} from '${2: module}';",
"",
"describe('${3:describe}', () => {",
" it('should ${4:test}', () => {",
" });",
"});",
]
},
"React class compoonent": {
"prefix": "react class component",
"body": [
"import React from 'react'",
"",
"export class ${1: name} extends React.Component {",
" render() {",
" return (",
" );",
" }",
"}"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment