Last active
June 15, 2017 23:28
-
-
Save rachsmithcodes/da06729482d8fe16da4e22ccbabe54bf to your computer and use it in GitHub Desktop.
New Container Component VSCode User Snippet
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
"New Container Component": { | |
"prefix": "ncc", | |
"body": [ | |
"import { connect } from 'react-redux';", | |
"import ${1:name} from './${1:name}';", | |
"", | |
"const mapStateToProps = state => {", | |
" return {$2};", | |
"};", | |
"", | |
"const mapDispatchToProps = dispatch => {", | |
" return {$3};", | |
"};", | |
"", | |
"const ${1:name}Container = connect(mapStateToProps, mapDispatchToProps)(${1:name});", | |
"export default ${1:name}Container;" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment