Created
March 24, 2019 21:39
-
-
Save edujtm/c17225891d50318ef28df4a1950023a6 to your computer and use it in GitHub Desktop.
Some VS Code snippets for React.
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
{ | |
"Create Reducer Template": { | |
"prefix": "rreducer", | |
"body": [ | |
"const INITIAL_STATE = {};", | |
"", | |
"export default (state = INITIAL_STATE, action) => {", | |
" switch (action.type) {", | |
" default:", | |
" return state;", | |
" }", | |
"};" | |
], | |
"description": "Small template for reducers" | |
}, | |
"Create stateful component": { | |
"prefix": "fulComponent", | |
"body": [ | |
"import React, { Component } from 'react';", | |
"", | |
"class ${1:className} extends Component {", | |
" render() {", | |
" return (", | |
" ", | |
" );", | |
" }", | |
"}", | |
"", | |
"export default ${className};" | |
], | |
"description": "Create a stateful react component" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment