Skip to content

Commit 5a21726

Browse files
committed
Added component will mount life cycle method.
1 parent 2ed3362 commit 5a21726

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ Enjoy :D
2929
|Prefix|Method|
3030
|-------:|-------|
3131
|`rcc→`|`import React, { Component } from 'react';` <br> `export default class ${1:componentName}` <br> `extends Component {` <br> `render () {` <br> `return (` <br> `<div>` <br> ` $2` <br> `</div>` <br> `)` <br> `}` <br> `}`|
32+
|`cpwm→`| `componentWillMount($1) { $2 }`|
33+
|`rcredux→`| `Renders a React connected component`|
34+
35+
3236

3337

3438
## React Redux

snippets/snippets.cson

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ export default class ${1:componentName} extends Component {
6161
}
6262
}
6363
"""
64+
'componentWillMount method':
65+
'prefix': 'cpwm'
66+
'body': """componentWillMount($1) {
67+
$2
68+
}
69+
70+
"""
6471
# React Redux
6572
'Component with redux':
6673
'prefix': 'rcredux'

0 commit comments

Comments
 (0)