File tree Expand file tree Collapse file tree 2 files changed +48
-2
lines changed Expand file tree Collapse file tree 2 files changed +48
-2
lines changed Original file line number Diff line number Diff line change 1
1
# es6-react-redux-snippets
2
2
This is the best package ever created for ES6, React and Redux
3
+
4
+
5
+ TODO: ADD snippets list
Original file line number Diff line number Diff line change 5
5
' .source.js' :
6
6
' Annonymous function' :
7
7
' prefix' : ' anfn'
8
- ' body' : ' (${1:params}) => {
8
+ ' body' : """ (${1:params}) => {
9
9
$2
10
- }'
10
+ }"""
11
+
12
+ ' .source.js' :
13
+ ' Named function' :
14
+ ' prefix' : ' nfn'
15
+ ' body' : ' const ${1:functionName} = (${2:params}) => { $3 }'
11
16
12
17
' .source.js' :
13
18
' function' :
14
19
' prefix' : ' fn'
15
20
' body' : """ function ${1:functionName} (${2:params}) {
16
21
$3
17
22
}"""
23
+
24
+ ' .source.js' :
25
+ ' Import snippet' :
26
+ ' prefix' : ' imp'
27
+ ' body' : """ import ${1:ModuleName} from '${2:Module}';"""
28
+
29
+
30
+ ' .source.js' :
31
+ ' Import destructured' :
32
+ ' prefix' : ' imd'
33
+ ' body' : """ import { ${1:destructuredModule} } from '${2:module}'"""
34
+
35
+ ' .source.js' :
36
+ ' Import Everything' :
37
+ ' prefix' : ' ime'
38
+ ' body' : """ 'import * as ${1:alias} from '${2:module}'"""
39
+
40
+
41
+
42
+ # React
43
+ ' .source.js' :
44
+ ' React Component Snipet' :
45
+ ' prefix' : ' rcc' fl
46
+ ' body' : """ import React, { Component } from 'react';
47
+
48
+ export default class ${1:componentName} extends Component {
49
+ render() {
50
+ return (
51
+ <div>
52
+ $2
53
+ </div>
54
+ )
55
+ }
56
+ }
57
+
58
+
59
+ """
60
+
You can’t perform that action at this time.
0 commit comments