File tree Expand file tree Collapse file tree 1 file changed +56
-3
lines changed Expand file tree Collapse file tree 1 file changed +56
-3
lines changed Original file line number Diff line number Diff line change 4343' .source.js' :
4444 ' Import Everything' :
4545 ' prefix' : ' ime'
46- ' body' : """ ' import * as ${1:alias} from '${2:module}' """
46+ ' body' : """ import * as ${1:alias} from '${2:module}"""
4747
48+ ' .source.js' :
49+ ' For of loop' :
50+ ' prefix' : ' fof'
51+ ' body' : """ for(let ${1:itemName} of ${2:iterable} {
52+ ${3}
53+ }
54+ """
55+ ' .source.js' :
56+ ' For in loop' :
57+ ' prefix' : ' fin'
58+ ' body' : """ for(let ${1:itemName} in ${2:iterable} {
59+ $3
60+ }"""
4861
4962
63+ ' .source.js' :
64+ ' Method' :
65+ ' prefix' : ' met'
66+ ' body' : """ ${1:methodName} = (${2:params}) => { $3 }
67+ """
68+
5069# React
5170' .source.js' :
5271 ' React Component Snipet' :
53- ' prefix' : ' rcc' fl
72+ ' prefix' : ' rcc'
5473 ' body' : """ import React, { Component } from 'react';
5574
5675export default class ${1:componentName} extends Component {
@@ -62,7 +81,41 @@ export default class ${1:componentName} extends Component {
6281 )
6382 }
6483}
84+ """
85+
86+ # React Redux
87+ ' .source.js' :
88+ ' Component with redux' :
89+ ' prefix' : ' rcredux'
90+ ' body' : """
91+ import React, { Component } from 'react';
92+ import { connect } from 'react-redux';
93+
94+ export class ${1:componentName} extends Component {
95+
96+ render() {
97+ return (
98+ <div>
99+
100+ </div>
101+ )
102+ }
103+ }
104+
105+ const mapStateToProps = (state) => ({
65106
107+ });
66108
109+ const mapDispatchToProps = {
110+
111+ }
112+
113+ export default connect(mapStateToProps, mapDispatchToProps)(${1:componentName});
67114 """
68-
115+
116+
117+ # Redux
118+ ' .source.js' :
119+ ' Redux conts' :
120+ ' prefix' : ' rxconst'
121+ ' body' : """ export const ${1:constName} = '${1:constName}';"""
You can’t perform that action at this time.
0 commit comments