Last active
June 10, 2018 17:40
-
-
Save dmurawsky/229262c5b74179823f86ca4034ae8ce8 to your computer and use it in GitHub Desktop.
VS 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
Show hidden characters
{ | |
"Print to console": { | |
"scope": "javascript,typescript", | |
"prefix": "log", | |
"body": [ | |
"console.log('$1', $2);" | |
], | |
"description": "Log output to console" | |
}, | |
"prettier": { | |
"scope": "json", | |
"prefix": "prettier", | |
"body": [ | |
"\"prettier\": {", | |
"\t\"semi\": false,", | |
"\t\"singleQuote\": true,", | |
"\t\"trailingComma\": \"all\"", | |
"},", | |
], | |
"description": "Log output to console" | |
}, | |
"Basic Redux Component": { | |
"scope": "javascript", | |
"prefix": "basic-redux", | |
"body": [ | |
"import React from 'react'", | |
"import {connect} from 'react-redux'", | |
"", | |
"export const $1 = ({$2}) => <pre>{JSON.stringify($2, null, 2)}</pre>", | |
"", | |
"export const mapStateToProps = ({$2}) => ({$2})", | |
"export const mapDispatchToProps = d => ({$3: payload => ({type: '$4', payload}) })", | |
"", | |
"export default connect(mapStateToProps, mapDispatchToProps)($1)", | |
], | |
"description": "Template for basic redux connected component" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment