Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cca57bc

Browse files
committed
Update README
1 parent 2dde967 commit cca57bc

File tree

1 file changed

+49
-31
lines changed

1 file changed

+49
-31
lines changed

‎README.md

Lines changed: 49 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A Vim snippet library for React in ES6.
44

55
Requires [UltiSnips](https://github.com/SirVer/ultisnips).
66

7-
[vim-react-snippets](http://i.imgur.com/ImgaW2k.gifv)
7+
![vim-react-snippets](http://i.imgur.com/ImgaW2k.gif)
88

99
## Installation
1010

@@ -20,37 +20,55 @@ Plug 'SirVer/ultisnips'
2020

2121
## Snippets
2222

23+
#### Skeleton
24+
25+
| Trigger | Content |
26+
| -------: | ------- |
27+
| `rrcc→` | React Redux Class Component |
28+
| `rcc→` | React Class Component |
29+
| `rfc→` | React Functional Component |
30+
31+
32+
#### Lifecycle
33+
34+
| Trigger | Content |
35+
| -------: | ------- |
36+
| `cwm→` | `componentWillMount() {...}` |
37+
| `cdm→` | `componentDidMount() {...}` |
38+
| `cwrp→` | `componentWillReceiveProps(nextProps) {...}` |
39+
| `scup→` | `shouldComponentUpdate(nextProps, nextState) {...}` |
40+
| `cwup→` | `componentWillUpdate(nextProps, nextState) {...}` |
41+
| `cdup→` | `componentDidUpdate(prevProps, prevState) {...}` |
42+
| `cwu→` | `componentWillUnmount() {...}` |
43+
44+
45+
#### PropTypes
46+
47+
| Trigger | Content |
48+
| -------: | ------- |
49+
| `pt→` | `propTypes { ... }` |
50+
| `pt.a→` | `PropTypes.array` |
51+
| `pt.b→` | `PropTypes.bool` |
52+
| `pt.f→` | `PropTypes.func` |
53+
| `pt.n→` | `PropTypes.number` |
54+
| `pt.o→` | `PropTypes.object` |
55+
| `pt.s→` | `PropTypes.string` |
56+
| `pt.no→` | `PropTypes.node` |
57+
| `pt.e→` | `PropTypes.element` |
58+
| `pt.io→` | `PropTypes.instanceOf` |
59+
| `pt.one→` | `PropTypes.oneOf` |
60+
| `pt.onet→` | `PropTypes.oneOfType (Union)` |
61+
| `pt.ao→` | `PropTypes.arrayOf (Instances)` |
62+
| `pt.oo→` | `PropTypes.objectOf` |
63+
| `pt.sh→` | `PropTypes.shape` |
64+
| `ir→` | `isRequired` |
65+
66+
#### Others
67+
2368
| Trigger | Content |
2469
| -------: | ------- |
25-
| `rcc→` | class component skeleton |
26-
| `rcc→` | legacy component skeleton |
27-
| `cdm→` | `componentDidMount() {...}` |
28-
| `cdup→` | `componentDidUpdate(prevProps, prevState) {...}` |
29-
| `cwm→` | `componentWillMount() {...}` |
30-
| `cwr→` | `componentWillReceiveProps(nextProps) {...}` |
31-
| `cwun→` | `componentWillUnmount() {...}` |
32-
| `cwup→` | `componentWillUpdate(nextProps, nextState) {...}` |
33-
| `fdn→` | `React.findDOMNode(...)` |
34-
| `gdp→` | `getDefaultProps() {...}` |
35-
| `gis→` | `getInitialState() {...}` |
36-
| `ren→` | `render() {...}` |
37-
| `sst→` | `this.setState(...)` |
38-
| `scu→` | `shouldComponentUpdate(nextProps, nextState) {...}` |
3970
| `props→` | `this.props` |
4071
| `state→` | `this.state` |
41-
| `pt→` | `propTypes { ... }` |
42-
| `pta→` | `PropTypes.arrayOf` |
43-
| `ptai→` | `PropTypes.arrayOf (Instances)` |
44-
| `ptb→` | `PropTypes.bool` |
45-
| `pte→` | `PropTypes.element` |
46-
| `ptf→` | `PropTypes.func` |
47-
| `pti→` | `PropTypes.instanceOf` |
48-
| `ptn→` | `PropTypes.number` |
49-
| `ptn→` | `PropTypes.node` |
50-
| `pto→` | `PropTypes.object` |
51-
| `ptof→` | `PropTypes.oneOf (Enum)` |
52-
| `ptof→` | `PropTypes.objectOf` |
53-
| `ptoft→` | `PropTypes.oneOfType (Union)` |
54-
| `pts→` | `PropTypes.string` |
55-
| `ptsp→` | `PropTypes.shape` |
56-
72+
| `set→` | `this.setState(...)` |
73+
| `dp→` | `defaultProps { ... }` |
74+
| `cn→` | `className` |

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /