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 43
43
' .source.js' :
44
44
' Import Everything' :
45
45
' prefix' : ' ime'
46
- ' body' : """ ' import * as ${1:alias} from '${2:module}' """
46
+ ' body' : """ import * as ${1:alias} from '${2:module}"""
47
47
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
+ }"""
48
61
49
62
63
+ ' .source.js' :
64
+ ' Method' :
65
+ ' prefix' : ' met'
66
+ ' body' : """ ${1:methodName} = (${2:params}) => { $3 }
67
+ """
68
+
50
69
# React
51
70
' .source.js' :
52
71
' React Component Snipet' :
53
- ' prefix' : ' rcc' fl
72
+ ' prefix' : ' rcc'
54
73
' body' : """ import React, { Component } from 'react';
55
74
56
75
export default class ${1:componentName} extends Component {
@@ -62,7 +81,41 @@ export default class ${1:componentName} extends Component {
62
81
)
63
82
}
64
83
}
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) => ({
65
106
107
+ });
66
108
109
+ const mapDispatchToProps = {
110
+
111
+ }
112
+
113
+ export default connect(mapStateToProps, mapDispatchToProps)(${1:componentName});
67
114
"""
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