File tree 2 files changed +6
-0
lines changed 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ Every space inside `{ }` and `( )` means that this is pushed into next line :)
76
76
| ` rcontext→ ` | ` const ${1:contextName} = React.createContext() ` |
77
77
| ` cref→ ` | ` this.${1:refName}Ref = React.createRef() ` |
78
78
| ` fref→ ` | ` const ref = React.createRef() ` |
79
+ | ` bnd→ ` | ` this.methodName = this.methodName.bind(this) ` |
79
80
80
81
## React Native
81
82
Original file line number Diff line number Diff line change 561
561
"prefix" : " state" ,
562
562
"body" : " this.state.$0"
563
563
},
564
+ "bindThis" : {
565
+ "prefix" : " bnd" ,
566
+ "body" : " this.${1:methodName} = this.${1:methodName}.bind(this)$0" ,
567
+ "description" : " Binds this to a method"
568
+ },
564
569
// ==============================================================================================
565
570
// Redux
566
571
"reduxAction" : {
You can’t perform that action at this time.
0 commit comments