summaryrefslogtreecommitdiff
path: root/luasnip_snippets/coffee-react.json
blob: ceca92504bb49d738f72eac6cba1666c6d2b6bf4 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
  "createClass": {
    "prefix": "createClass",
    "description": "React define Class",
    "body": [
      "${1:classname}Class = React.createClass",
      "\tdisplayName: \"$1\"",
      "\trender: ->",
      "\t\t$2",
      "$1 = React.createFactory($1)"
    ],
    "luasnip": {
      "priority": -49
    }
  },
  "PropTypes": {
    "prefix": "PropTypes",
    "description": "React define propTypes",
    "body": [
      "propTypes: ->",
      "\t${1:myVar}: React.PropTypes.${2:type}${3:.isRequired}"
    ]
  },
  "propType": {
    "prefix": "propType",
    "description": "React propType (key/value)",
    "body": [
      "${1:myVar}: React.PropTypes.${2:type}${3:.isRequired}",
      "$4"
    ]
  },
  "setState": {
    "prefix": "setState",
    "description": "React setState",
    "body": [
      "@setState",
      "\t${1:myvar}: ${2:myvalue}",
      "\t$3"
    ]
  },
  "getInitialState": {
    "prefix": "getInitialState",
    "description": "React define getInitialState",
    "body": [
      "getInitialState: ->",
      "\t${1:myvar}: ${2:myvalue}",
      "\t$3"
    ]
  },
  "getDefaultProps": {
    "prefix": "getDefaultProps",
    "description": "React define getDefaultProps",
    "body": [
      "getDefaultProps: ->",
      "\t${1:myvar}: ${2:myvalue}",
      "\t$3"
    ]
  },
  "componentWillMount": {
    "prefix": "componentWillMount",
    "description": "React define componentWillMount",
    "body": [
      "componentWillMount: ->",
      "\t$1"
    ]
  },
  "componentDidMount": {
    "prefix": "componentDidMount",
    "description": "React define componentDidMount",
    "body": [
      "componentDidMount: ->",
      "\t$1"
    ]
  },
  "componentWillReceiveProps": {
    "prefix": "componentWillReceiveProps",
    "description": "React define componentWillReceiveProps",
    "body": [
      "componentWillReceiveProps: (nextProps) ->",
      "\t$1"
    ]
  },
  "shouldComponentUpdate": {
    "prefix": "shouldComponentUpdate",
    "description": "React define shouldComponentUpdate",
    "body": [
      "shouldComponentUpdate: (nextProps, nextState) ->",
      "\t$1"
    ]
  },
  "componentWillUpdate": {
    "prefix": "componentWillUpdate",
    "description": "React define componentWillUpdate",
    "body": [
      "componentWillUpdate: (nextProps, nextState) ->",
      "\t$1"
    ]
  },
  "componentDidUpdate": {
    "prefix": "componentDidUpdate",
    "description": "React define componentDidUpdate",
    "body": [
      "componentDidUpdate: (prevProps, prevState) ->",
      "\t$1"
    ]
  },
  "componentWillUnmount": {
    "prefix": "componentWillUnmount",
    "description": "React define componentWillUnmount",
    "body": [
      "componentWillUnmount: ->",
      "\t$1"
    ]
  }
}