@@ -22,118 +22,118 @@ Every space inside `{ }` and `( )` means that this is pushed into next line :)
22
22
23
23
## Basic Methods
24
24
25
- | Prefix | Method |
25
+ | Prefix | Method |
26
26
| ------: | --------------------------------------------------- |
27
- | ` imp→ ` | ` import moduleName from 'module' ` |
28
- | ` imn→ ` | ` import 'module' ` |
29
- | ` imd→ ` | ` import { destructuredModule } from 'module' ` |
30
- | ` ime→ ` | ` import * as alias from 'module' ` |
31
- | ` ima→ ` | ` import { originalName as aliasName} from 'module' ` |
32
- | ` exp→ ` | ` export default moduleName ` |
33
- | ` exd→ ` | ` export { destructuredModule } from 'module' ` |
34
- | ` exa→ ` | ` export { originalName as aliasName} from 'module' ` |
35
- | ` enf→ ` | ` export const functionName = (params) => { } ` |
36
- | ` edf→ ` | ` export default (params) => { } ` |
37
- | ` met→ ` | ` methodName = (params) => { } ` |
38
- | ` fre→ ` | ` arrayName.forEach(element => { } ` |
39
- | ` fof→ ` | ` for(let itemName of objectName { } ` |
40
- | ` fin→ ` | ` for(let itemName in objectName { } ` |
27
+ | ` imp→ ` | ` import moduleName from 'module' ` |
28
+ | ` imn→ ` | ` import 'module' ` |
29
+ | ` imd→ ` | ` import { destructuredModule } from 'module' ` |
30
+ | ` ime→ ` | ` import * as alias from 'module' ` |
31
+ | ` ima→ ` | ` import { originalName as aliasName} from 'module' ` |
32
+ | ` exp→ ` | ` export default moduleName ` |
33
+ | ` exd→ ` | ` export { destructuredModule } from 'module' ` |
34
+ | ` exa→ ` | ` export { originalName as aliasName} from 'module' ` |
35
+ | ` enf→ ` | ` export const functionName = (params) => { } ` |
36
+ | ` edf→ ` | ` export default (params) => { } ` |
37
+ | ` met→ ` | ` methodName = (params) => { } ` |
38
+ | ` fre→ ` | ` arrayName.forEach(element => { } ` |
39
+ | ` fof→ ` | ` for(let itemName of objectName { } ` |
40
+ | ` fin→ ` | ` for(let itemName in objectName { } ` |
41
41
| ` anfn→ ` | ` (params) => { } ` |
42
- | ` nfn→ ` | ` const functionName = (params) => { } ` |
43
- | ` dob→ ` | ` const {propName} = objectToDescruct ` |
44
- | ` dar→ ` | ` const [propName] = arrayToDescruct ` |
45
- | ` sti→ ` | ` setInterval(() => { }, intervalTime ` |
46
- | ` sto→ ` | ` setTimeout(() => { }, delayTime ` |
42
+ | ` nfn→ ` | ` const functionName = (params) => { } ` |
43
+ | ` dob→ ` | ` const {propName} = objectToDescruct ` |
44
+ | ` dar→ ` | ` const [propName] = arrayToDescruct ` |
45
+ | ` sti→ ` | ` setInterval(() => { }, intervalTime ` |
46
+ | ` sto→ ` | ` setTimeout(() => { }, delayTime ` |
47
47
| ` prom→ ` | ` return new Promise((resolve, reject) => { } ` |
48
48
| ` cmmb→ ` | ` comment block ` |
49
- | ` cp→ ` | ` const { } = this.props ` |
50
- | ` cs→ ` | ` const { } = this.state ` |
49
+ | ` cp→ ` | ` const { } = this.props ` |
50
+ | ` cs→ ` | ` const { } = this.state ` |
51
51
52
52
## React
53
53
54
- | Prefix | Method |
54
+ | Prefix | Method |
55
55
| ----------: | ----------------------------------------------------------------------------------- |
56
- | ` imr→ ` | ` import React from 'react' ` |
57
- | ` imrd→ ` | ` import ReactDOM from 'react-dom' ` |
58
- | ` imrc→ ` | ` import React, { Component } from 'react' ` |
59
- | ` imrcp→ ` | ` import React, { Component } from 'react' & import PropTypes from 'prop-types' ` |
60
- | ` imrpc→ ` | ` import React, { PureComponent } from 'react' ` |
61
- | ` imrpcp→ ` | ` import React, { PureComponent } from 'react' & import PropTypes from 'prop-types' ` |
62
- | ` imrm→ ` | ` import React, { memo } from 'react' ` |
63
- | ` imrmp→ ` | ` import React, { memo } from 'react' & import PropTypes from 'prop-types' ` |
64
- | ` impt→ ` | ` import PropTypes from 'prop-types' ` |
65
- | ` redux→ ` | ` import { connect } from 'react-redux' ` |
66
- | ` rconst→ ` | ` constructor(props) with this.state ` |
67
- | ` rconc→ ` | ` constructor(props, context) with this.state ` |
68
- | ` est→ ` | ` this.state = { } ` |
69
- | ` cwm→ ` | ` componentWillMount = () => { } ` DEPRECATED!!! |
70
- | ` cdm→ ` | ` componentDidMount = () => { } ` |
71
- | ` cwr→ ` | ` componentWillReceiveProps = (nextProps) => { } ` DEPRECATED!!! |
72
- | ` scu→ ` | ` shouldComponentUpdate = (nextProps, nextState) => { } ` |
73
- | ` cwup→ ` | ` componentWillUpdate = (nextProps, nextState) => { } ` DEPRECATED!!! |
74
- | ` cdup→ ` | ` componentDidUpdate = (prevProps, prevState) => { } ` |
75
- | ` cwun→ ` | ` componentWillUnmount = () => { } ` |
76
- | ` gdsfp→ ` | ` static getDerivedStateFromProps(nextProps, prevState) { } ` |
77
- | ` gsbu→ ` | ` getSnapshotBeforeUpdate = (prevProps, prevState) => { } ` |
78
- | ` ren→ ` | ` render() { return( ) } ` |
79
- | ` sst→ ` | ` this.setState({ }) ` |
80
- | ` ssf→ ` | ` this.setState((state, props) => return { }) ` |
81
- | ` props→ ` | ` this.props.propName ` |
82
- | ` state→ ` | ` this.state.stateName ` |
56
+ | ` imr→ ` | ` import React from 'react' ` |
57
+ | ` imrd→ ` | ` import ReactDOM from 'react-dom' ` |
58
+ | ` imrc→ ` | ` import React, { Component } from 'react' ` |
59
+ | ` imrcp→ ` | ` import React, { Component } from 'react' & import PropTypes from 'prop-types' ` |
60
+ | ` imrpc→ ` | ` import React, { PureComponent } from 'react' ` |
61
+ | ` imrpcp→ ` | ` import React, { PureComponent } from 'react' & import PropTypes from 'prop-types' ` |
62
+ | ` imrm→ ` | ` import React, { memo } from 'react' ` |
63
+ | ` imrmp→ ` | ` import React, { memo } from 'react' & import PropTypes from 'prop-types' ` |
64
+ | ` impt→ ` | ` import PropTypes from 'prop-types' ` |
65
+ | ` redux→ ` | ` import { connect } from 'react-redux' ` |
66
+ | ` rconst→ ` | ` constructor(props) with this.state ` |
67
+ | ` rconc→ ` | ` constructor(props, context) with this.state ` |
68
+ | ` est→ ` | ` this.state = { } ` |
69
+ | ` cwm→ ` | ` componentWillMount = () => { } ` DEPRECATED!!! |
70
+ | ` cdm→ ` | ` componentDidMount = () => { } ` |
71
+ | ` cwr→ ` | ` componentWillReceiveProps = (nextProps) => { } ` DEPRECATED!!! |
72
+ | ` scu→ ` | ` shouldComponentUpdate = (nextProps, nextState) => { } ` |
73
+ | ` cwup→ ` | ` componentWillUpdate = (nextProps, nextState) => { } ` DEPRECATED!!! |
74
+ | ` cdup→ ` | ` componentDidUpdate = (prevProps, prevState) => { } ` |
75
+ | ` cwun→ ` | ` componentWillUnmount = () => { } ` |
76
+ | ` gdsfp→ ` | ` static getDerivedStateFromProps(nextProps, prevState) { } ` |
77
+ | ` gsbu→ ` | ` getSnapshotBeforeUpdate = (prevProps, prevState) => { } ` |
78
+ | ` ren→ ` | ` render() { return( ) } ` |
79
+ | ` sst→ ` | ` this.setState({ }) ` |
80
+ | ` ssf→ ` | ` this.setState((state, props) => return { }) ` |
81
+ | ` props→ ` | ` this.props.propName ` |
82
+ | ` state→ ` | ` this.state.stateName ` |
83
83
| ` rcontext→ ` | ` const ${1:contextName} = React.createContext() ` |
84
- | ` cref→ ` | ` this.${1:refName}Ref = React.createRef() ` |
85
- | ` fref→ ` | ` const ref = React.createRef() ` |
86
- | ` bnd→ ` | ` this.methodName = this.methodName.bind(this) ` |
84
+ | ` cref→ ` | ` this.${1:refName}Ref = React.createRef() ` |
85
+ | ` fref→ ` | ` const ref = React.createRef() ` |
86
+ | ` bnd→ ` | ` this.methodName = this.methodName.bind(this) ` |
87
87
88
88
## React Native
89
89
90
- | Prefix | Method |
90
+ | Prefix | Method |
91
91
| ---------: | -------------------------------------- |
92
- | ` imrn→ ` | ` import { $1 } from 'react-native' ` |
92
+ | ` imrn→ ` | ` import { $1 } from 'react-native' ` |
93
93
| ` rnstyle→ ` | ` const styles = StyleSheet.create({}) ` |
94
94
95
95
## Redux
96
96
97
- | Prefix | Method |
97
+ | Prefix | Method |
98
98
| -----------: | ------------------------- |
99
- | ` rxaction→ ` | ` redux action template ` |
100
- | ` rxconst→ ` | ` export const $1 = '$1' ` |
99
+ | ` rxaction→ ` | ` redux action template ` |
100
+ | ` rxconst→ ` | ` export const $1 = '$1' ` |
101
101
| ` rxreducer→ ` | ` redux reducer template ` |
102
- | ` rxselect→ ` | ` redux selector template ` |
102
+ | ` rxselect→ ` | ` redux selector template ` |
103
103
104
104
## PropTypes
105
105
106
- | Prefix | Method |
106
+ | Prefix | Method |
107
107
| --------: | ---------------------------------------- |
108
- | ` pta→ ` | ` PropTypes.array ` |
109
- | ` ptar→ ` | ` PropTypes.array.isRequired ` |
110
- | ` ptb→ ` | ` PropTypes.bool ` |
111
- | ` ptbr→ ` | ` PropTypes.bool.isRequired ` |
112
- | ` ptf→ ` | ` PropTypes.func ` |
113
- | ` ptfr→ ` | ` PropTypes.func.isRequired ` |
114
- | ` ptn→ ` | ` PropTypes.number ` |
115
- | ` ptnr→ ` | ` PropTypes.number.isRequired ` |
116
- | ` pto→ ` | ` PropTypes.object ` |
117
- | ` ptor→ ` | ` PropTypes.object.isRequired ` |
118
- | ` pts→ ` | ` PropTypes.string ` |
119
- | ` ptsr→ ` | ` PropTypes.string.isRequired ` |
120
- | ` ptnd→ ` | ` PropTypes.node ` |
121
- | ` ptndr→ ` | ` PropTypes.node.isRequired ` |
122
- | ` ptel→ ` | ` PropTypes.element ` |
123
- | ` ptelr→ ` | ` PropTypes.element.isRequired ` |
124
- | ` pti→ ` | ` PropTypes.instanceOf(name) ` |
125
- | ` ptir→ ` | ` PropTypes.instanceOf(name).isRequired ` |
126
- | ` pte→ ` | ` PropTypes.oneOf([name]) ` |
127
- | ` pter→ ` | ` PropTypes.oneOf([name]).isRequired ` |
128
- | ` ptet→ ` | ` PropTypes.oneOfType([name]) ` |
129
- | ` ptetr→ ` | ` PropTypes.oneOfType([name]).isRequired ` |
130
- | ` ptao→ ` | ` PropTypes.arrayOf(name) ` |
131
- | ` ptaor→ ` | ` PropTypes.arrayOf(name).isRequired ` |
132
- | ` ptoo→ ` | ` PropTypes.objectOf(name) ` |
133
- | ` ptoor→ ` | ` PropTypes.objectOf(name).isRequired ` |
134
- | ` ptsh→ ` | ` PropTypes.shape({ }) ` |
135
- | ` ptshr→ ` | ` PropTypes.shape({ }).isRequired ` |
136
- | ` ptany→ ` | ` PropTypes.any ` |
108
+ | ` pta→ ` | ` PropTypes.array ` |
109
+ | ` ptar→ ` | ` PropTypes.array.isRequired ` |
110
+ | ` ptb→ ` | ` PropTypes.bool ` |
111
+ | ` ptbr→ ` | ` PropTypes.bool.isRequired ` |
112
+ | ` ptf→ ` | ` PropTypes.func ` |
113
+ | ` ptfr→ ` | ` PropTypes.func.isRequired ` |
114
+ | ` ptn→ ` | ` PropTypes.number ` |
115
+ | ` ptnr→ ` | ` PropTypes.number.isRequired ` |
116
+ | ` pto→ ` | ` PropTypes.object ` |
117
+ | ` ptor→ ` | ` PropTypes.object.isRequired ` |
118
+ | ` pts→ ` | ` PropTypes.string ` |
119
+ | ` ptsr→ ` | ` PropTypes.string.isRequired ` |
120
+ | ` ptnd→ ` | ` PropTypes.node ` |
121
+ | ` ptndr→ ` | ` PropTypes.node.isRequired ` |
122
+ | ` ptel→ ` | ` PropTypes.element ` |
123
+ | ` ptelr→ ` | ` PropTypes.element.isRequired ` |
124
+ | ` pti→ ` | ` PropTypes.instanceOf(name) ` |
125
+ | ` ptir→ ` | ` PropTypes.instanceOf(name).isRequired ` |
126
+ | ` pte→ ` | ` PropTypes.oneOf([name]) ` |
127
+ | ` pter→ ` | ` PropTypes.oneOf([name]).isRequired ` |
128
+ | ` ptet→ ` | ` PropTypes.oneOfType([name]) ` |
129
+ | ` ptetr→ ` | ` PropTypes.oneOfType([name]).isRequired ` |
130
+ | ` ptao→ ` | ` PropTypes.arrayOf(name) ` |
131
+ | ` ptaor→ ` | ` PropTypes.arrayOf(name).isRequired ` |
132
+ | ` ptoo→ ` | ` PropTypes.objectOf(name) ` |
133
+ | ` ptoor→ ` | ` PropTypes.objectOf(name).isRequired ` |
134
+ | ` ptsh→ ` | ` PropTypes.shape({ }) ` |
135
+ | ` ptshr→ ` | ` PropTypes.shape({ }).isRequired ` |
136
+ | ` ptany→ ` | ` PropTypes.any ` |
137
137
| ` ptypes→ ` | ` static propTypes = {} ` |
138
138
139
139
## GraphQL
@@ -151,6 +151,9 @@ export default compose(graphql($1, { name: $2 }))($3)
151
151
| Prefix | Method |
152
152
| -----: | ----------------------------------- |
153
153
| ` clg→ ` | ` console.log(object) ` |
154
+ | ` clo→ ` | ` console.log("object", object) ` |
155
+ | ` ctm→ ` | ` console.time("timeId") ` |
156
+ | ` cte→ ` | ` console.timeEnd("timeId") ` |
154
157
| ` cas→ ` | ` console.assert(expression,object) ` |
155
158
| ` ccl→ ` | ` console.clear() ` |
156
159
| ` cco→ ` | ` console.count(label) ` |
0 commit comments