diff options
author | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:03:25 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:03:25 +0200 |
commit | e573b3020c032400eed60b649a2cbf55266e6bb0 (patch) | |
tree | 8f572394ac8433529c7a8e70d160a2fbe8268b4e /vim/bundle/vim-snippets/UltiSnips/coffee-react.snippets | |
parent | b8c667bd64b3edd38d56c63c5bd1db53a23b4499 (diff) | |
download | myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.tar.gz myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.tar.bz2 myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.zip |
Add current configurations from old repository
Diffstat (limited to 'vim/bundle/vim-snippets/UltiSnips/coffee-react.snippets')
-rw-r--r-- | vim/bundle/vim-snippets/UltiSnips/coffee-react.snippets | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/vim/bundle/vim-snippets/UltiSnips/coffee-react.snippets b/vim/bundle/vim-snippets/UltiSnips/coffee-react.snippets new file mode 100644 index 0000000..4cdb40f --- /dev/null +++ b/vim/bundle/vim-snippets/UltiSnips/coffee-react.snippets @@ -0,0 +1,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 |