Last active
April 17, 2018 17:00
-
-
Save MarcoNicolodi/6b5cc35e4b0f6d4fa3fbcafe66096c7b to your computer and use it in GitHub Desktop.
React code 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
"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