Skip to content

Commit 0e1e2b4

Browse files
committed
Added mapStateToProps snippet.
1 parent 365bc6b commit 0e1e2b4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Enjoy :D
4040
|Prefix|Method|
4141
|-------:|-------|
4242
|`rcredux→`|`React component with Redux`|
43+
|`mapS→`|`mapStateToProps function`|
4344

4445

4546
#Redux

snippets/snippets.cson

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ export default class ${1:componentName} extends Component {
6868
}
6969
"""
7070
# React Redux
71+
'mapStateToProps funtion':
72+
'prefix': 'mapS'
73+
'body': """const mapStateToProps= state => ({
74+
$1
75+
});
76+
77+
"""
78+
7179
'Component with redux':
7280
'prefix': 'rcredux'
7381
'body': """

0 commit comments

Comments
 (0)