File tree Expand file tree Collapse file tree 2 files changed +0
-43
lines changed Expand file tree Collapse file tree 2 files changed +0
-43
lines changed Original file line number Diff line number Diff line change 9
9
' Console log' :
10
10
' prefix' : ' log'
11
11
' body' : ' console.log(${1:msg})' ;
12
-
13
-
14
- ' .source.js' :
15
12
' Annonymous function' :
16
13
' prefix' : ' anfn'
17
14
' body' : """ (${1:params}) => {
18
15
$2
19
16
}"""
20
-
21
- ' .source.js' :
22
17
' Named function' :
23
18
' prefix' : ' nfn'
24
19
' body' : ' const ${1:functionName} = (${2:params}) => { $3 }'
25
-
26
- ' .source.js' :
27
20
' function' :
28
21
' prefix' : ' fn'
29
22
' body' : """ function ${1:functionName} (${2:params}) {
30
23
$3
31
24
}"""
32
-
33
- ' .source.js' :
34
25
' Import snippet' :
35
26
' prefix' : ' imp'
36
27
' body' : """ import ${1:ModuleName} from '${2:Module}';"""
37
-
38
-
39
- ' .source.js' :
40
28
' Import destructured' :
41
29
' prefix' : ' imd'
42
30
' body' : """ import { ${1:destructuredModule} } from '${2:module}'"""
43
-
44
- ' .source.js' :
45
31
' Import Everything' :
46
32
' prefix' : ' ime'
47
33
' body' : """ import * as ${1:alias} from '${2:module}"""
48
-
49
- ' .source.js' :
50
34
' For of loop' :
51
35
' prefix' : ' fof'
52
36
' body' : """ for(let ${1:itemName} of ${2:iterable} {
53
37
${3}
54
38
}
55
39
"""
56
- ' .source.js' :
57
40
' For in loop' :
58
41
' prefix' : ' fin'
59
42
' body' : """ for(let ${1:itemName} in ${2:iterable} {
60
43
$3
61
44
}"""
62
-
63
-
64
- ' .source.js' :
65
45
' Method' :
66
46
' prefix' : ' met'
67
47
' body' : """ ${1:methodName} = (${2:params}) => { $3 }
68
48
"""
69
-
70
49
# React
71
- ' .source.js' :
72
50
' React Component Snipet' :
73
51
' prefix' : ' rcc'
74
52
' body' : """ import React, { Component } from 'react';
@@ -83,9 +61,7 @@ export default class ${1:componentName} extends Component {
83
61
}
84
62
}
85
63
"""
86
-
87
64
# React Redux
88
- ' .source.js' :
89
65
' Component with redux' :
90
66
' prefix' : ' rcredux'
91
67
' body' : """
@@ -113,33 +89,23 @@ const mapDispatchToProps = {
113
89
114
90
export default connect(mapStateToProps, mapDispatchToProps)(${1:componentName});
115
91
"""
116
-
117
-
118
92
# Redux
119
- ' .source.js' :
120
93
' Redux conts' :
121
94
' prefix' : ' rxconst'
122
95
' body' : """ export const ${1:constName} = '${1:constName}';"""
123
-
124
-
125
- ' .source.js' :
126
96
' Snippet Name' :
127
97
' prefix' : ' rxaction'
128
98
' body' : """ export const ${1:actionName} = (action) => ({
129
99
type: type,
130
100
payload: action.payload
131
101
});
132
102
"""
133
-
134
- ' .source.js' :
135
103
' redux-saga Generator Function' :
136
104
' prefix' : ' rxgen'
137
105
' body' : """ export function* ${1:workerName}Saga() {
138
106
139
107
}
140
108
"""
141
-
142
- ' .source.js' :
143
109
' Redux reducer' :
144
110
' prefix' : ' rxreducer'
145
111
' body' : """ export default (state = { }, action) => {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments