blob: 4cdb40f8381b2d41bb31dd412d90b82ba8796655 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
#
# CoffeeScript versions -- adapted from coffee-jasmine
# for some ReactJS matchers.
#
priority -50
extends coffee
priority -49
snippet createClass "React define Class" b
${1:classname}Class = React.createClass
displayName: "$1"
render: ->
${2}
$1 = React.createFactory($1)
endsnippet
snippet PropTypes "React define propTypes" b
propTypes: ->
${1:myVar}: React.PropTypes.${2:type}${3:.isRequired}
endsnippet
snippet propType "React propType (key/value)" b
${1:myVar}: React.PropTypes.${2:type}${3:.isRequired}
${4}
endsnippet
snippet setState "React setState" b
@setState
${1:myvar}: ${2:myvalue}
${3}
endsnippet
snippet getInitialState "React define getInitialState" b
getInitialState: ->
${1:myvar}: ${2:myvalue}
${3}
endsnippet
snippet getDefaultProps "React define getDefaultProps" b
getDefaultProps: ->
${1:myvar}: ${2:myvalue}
${3}
endsnippet
snippet componentWillMount "React define componentWillMount" b
componentWillMount: ->
${1}
endsnippet
snippet componentDidMount "React define componentDidMount" b
componentDidMount: ->
${1}
endsnippet
snippet componentWillReceiveProps "React define componentWillReceiveProps" b
componentWillReceiveProps: (nextProps) ->
${1}
endsnippet
snippet shouldComponentUpdate "React define shouldComponentUpdate" b
shouldComponentUpdate: (nextProps, nextState) ->
${1}
endsnippet
snippet componentWillUpdate "React define componentWillUpdate" b
componentWillUpdate: (nextProps, nextState) ->
${1}
endsnippet
snippet componentDidUpdate "React define componentDidUpdate" b
componentDidUpdate: (prevProps, prevState) ->
${1}
endsnippet
snippet componentWillUnmount "React define componentWillUnmount" b
componentWillUnmount: ->
${1}
endsnippet
|