|
1 | 1 | {
|
2 | 2 | ".source.js":
|
3 |
| - "React: componentDidMount() { ... }": |
4 |
| - prefix: "_cdm" |
5 |
| - body: "componentDidMount() {\n\t${1}\n}," |
| 3 | + "React: componentDidMount() { ... }": |
| 4 | + prefix: "_cdm" |
| 5 | + body: "componentDidMount() {\n\t${1}\n}," |
6 | 6 |
|
7 |
| - "React: componentDidUpdate(pp, ps) { ... }": |
8 |
| - prefix: "_cdup" |
9 |
| - body: "componentDidUpdate(prevProps, prevState) {\n\t${1}\n}," |
| 7 | + "React: componentDidUpdate(pp, ps) { ... }": |
| 8 | + prefix: "_cdup" |
| 9 | + body: "componentDidUpdate(prevProps, prevState) {\n\t${1}\n}," |
10 | 10 |
|
11 |
| - "React: componentWillMount() { ... }": |
12 |
| - prefix: "_cwm" |
13 |
| - body: "componentWillMount() {\n\t${1}\n}," |
| 11 | + "React: componentWillMount() { ... }": |
| 12 | + prefix: "_cwm" |
| 13 | + body: "componentWillMount() {\n\t${1}\n}," |
14 | 14 |
|
15 |
| - "React: componentWillReceiveProps(np) { ... }": |
16 |
| - prefix: "_cwr" |
17 |
| - body: "componentWillReceiveProps(nextProps) {\n\t${1}\n}," |
| 15 | + "React: componentWillReceiveProps(np) { ... }": |
| 16 | + prefix: "_cwr" |
| 17 | + body: "componentWillReceiveProps(nextProps) {\n\t${1}\n}," |
18 | 18 |
|
19 |
| - "React: componentWillUnmount() { ... }": |
20 |
| - prefix: "_cwun" |
21 |
| - body: "componentWillUnmount() {\n\t${1}\n}," |
| 19 | + "React: componentWillUnmount() { ... }": |
| 20 | + prefix: "_cwun" |
| 21 | + body: "componentWillUnmount() {\n\t${1}\n}," |
22 | 22 |
|
23 |
| - "React: componentWillUpdate(np, ns) { ... }": |
24 |
| - prefix: "_cwu" |
25 |
| - body: "componentWillUpdate(nextProps, nextState) {\n\t${1}\n}," |
| 23 | + "React: componentWillUpdate(np, ns) { ... }": |
| 24 | + prefix: "_cwu" |
| 25 | + body: "componentWillUpdate(nextProps, nextState) {\n\t${1}\n}," |
26 | 26 |
|
27 |
| - "React: cx({ ... })": |
28 |
| - prefix: "_cx" |
29 |
| - body: "cx({\n\t$1: $2\n});" |
| 27 | + "React: cx({ ... })": |
| 28 | + prefix: "_cx" |
| 29 | + body: "cx({\n\t$1: $2\n});" |
30 | 30 |
|
31 |
| - "React: forceUpdate(...)": |
32 |
| - prefix: "_fup" |
33 |
| - body: "forceUpdate(${1:callback});" |
| 31 | + "React: forceUpdate(...)": |
| 32 | + prefix: "_fup" |
| 33 | + body: "forceUpdate(${1:callback});" |
34 | 34 |
|
35 |
| - "React: getDefaultProps() { return {...} } ": |
36 |
| - prefix: "_gdp" |
37 |
| - body: "getDefaultProps() {\n\treturn {\n\t\t${1}\n\t};\n}," |
| 35 | + "React: getDefaultProps() { return {...} } ": |
| 36 | + prefix: "_gdp" |
| 37 | + body: "getDefaultProps() {\n\treturn {\n\t\t${1}\n\t};\n}," |
38 | 38 |
|
39 |
| - "React: getInitialState() { return {...} } ": |
40 |
| - prefix: "_gis" |
41 |
| - body: "getInitialState() {\n\treturn {\n\t\t${1}: ${2}\n\t};\n}," |
| 39 | + "React: getInitialState() { return {...} } ": |
| 40 | + prefix: "_gis" |
| 41 | + body: "getInitialState() {\n\treturn {\n\t\t${1}: ${2}\n\t};\n}," |
42 | 42 |
|
43 |
| - "React: isMounted()": |
44 |
| - prefix: "_ism" |
45 |
| - body: "isMounted()" |
| 43 | + "React: isMounted()": |
| 44 | + prefix: "_ism" |
| 45 | + body: "isMounted()" |
46 | 46 |
|
47 |
| - "React: propTypes { ... }": |
48 |
| - prefix: "_pt" |
49 |
| - body: "propTypes: {\n\t${1}: React.PropTypes.${2:string}\n}," |
| 47 | + "React: propTypes { ... }": |
| 48 | + prefix: "_pt" |
| 49 | + body: "propTypes: {\n\t${1}: React.PropTypes.${2:string}\n}," |
50 | 50 |
|
51 |
| - "React: component skeleton": |
52 |
| - prefix: "_rcc" |
53 |
| - body: "import React from 'react';\n\nexport default React.createClass({\n\n\trender() {\n\t\treturn (\n\t\t\t${1:<div />}\n\t\t);\n\t}\n\n});" |
| 51 | + "React: component skeleton": |
| 52 | + prefix: "_rcc" |
| 53 | + body: "import React from 'react';\n\nexport default React.createClass({\n\n\trender() {\n\t\treturn (\n\t\t\t${1:<div />}\n\t\t);\n\t}\n\n});" |
54 | 54 |
|
55 |
| - "React: render() { return ... }": |
56 |
| - prefix: "_ren" |
57 |
| - body: "render() {\n\treturn (\n\t\t${1:<div />}\n\t);\n}" |
| 55 | + "React: render() { return ... }": |
| 56 | + prefix: "_ren" |
| 57 | + body: "render() {\n\treturn (\n\t\t${1:<div />}\n\t);\n}" |
58 | 58 |
|
59 |
| - "React: setState({ ... })": |
60 |
| - prefix: "_sst" |
61 |
| - body: "setState({\n\t${1}: ${2}\n});" |
| 59 | + "React: setState({ ... })": |
| 60 | + prefix: "_sst" |
| 61 | + body: "setState({\n\t${1}: ${2}\n});" |
62 | 62 |
|
63 |
| - "React: shouldComponentUpdate(np, ns) { ... }": |
64 |
| - prefix: "_scu" |
65 |
| - body: "shouldComponentUpdate(nextProps, nextState) {\n\t${1}\n}," |
| 63 | + "React: shouldComponentUpdate(np, ns) { ... }": |
| 64 | + prefix: "_scu" |
| 65 | + body: "shouldComponentUpdate(nextProps, nextState) {\n\t${1}\n}," |
66 | 66 |
|
67 |
| - "React: this.props.": |
68 |
| - prefix: "_props" |
69 |
| - body: "this.props.${1}" |
| 67 | + "React: this.props.": |
| 68 | + prefix: "_props" |
| 69 | + body: "this.props.${1}" |
70 | 70 |
|
71 |
| - "React: this.state.": |
72 |
| - prefix: "_state" |
73 |
| - body: "this.state.${1}" |
| 71 | + "React: this.state.": |
| 72 | + prefix: "_state" |
| 73 | + body: "this.state.${1}" |
74 | 74 |
|
75 |
| - "React: render(component, container, [callback])": |
76 |
| - prefix: "_rrc" |
77 |
| - body: "React.render(${1:<$2 />}, ${3:document.body}${4:, ${5:callback}});" |
| 75 | + "React: render(component, container, [callback])": |
| 76 | + prefix: "_rrc" |
| 77 | + body: "React.render(${1:<$2 />}, ${3:document.body}${4:, ${5:callback}});" |
78 | 78 | }
|
0 commit comments