MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/62ocys/es2018_first_look_it_changes_everything/dfog3m5/?context=3
r/javascript • u/saulorama • Mar 31 '17
120 comments sorted by
View all comments
Show parent comments
14
Well you can't really reuse arrow functions unless you put it into an object. Also it always binds this...there are some scenarios where this arguably isn't wanted
this
5 u/ajacksified Apr 01 '17 edited Apr 01 '17 I feel like my current 0 karma is the number of people who understand sarcasmEdit: and anyways if you don't want to bind this, don't use an arrow functionEdit2: can't reuse functions? What are you even talking about, that makes no sense 0 u/[deleted] Apr 01 '17 [deleted] 5 u/Daniel15 React FTW Apr 01 '17 const doubleBy2 = x => x * 2;Is identical to your doubleBy2 function. 2 u/GBcrazy Apr 01 '17 Actually you are right, what the hell i was thinking
5
I feel like my current 0 karma is the number of people who understand sarcasm
Edit: and anyways if you don't want to bind this, don't use an arrow function
Edit2: can't reuse functions? What are you even talking about, that makes no sense
0 u/[deleted] Apr 01 '17 [deleted] 5 u/Daniel15 React FTW Apr 01 '17 const doubleBy2 = x => x * 2;Is identical to your doubleBy2 function. 2 u/GBcrazy Apr 01 '17 Actually you are right, what the hell i was thinking
0
[deleted]
5 u/Daniel15 React FTW Apr 01 '17 const doubleBy2 = x => x * 2;Is identical to your doubleBy2 function. 2 u/GBcrazy Apr 01 '17 Actually you are right, what the hell i was thinking
const doubleBy2 = x => x * 2;
Is identical to your doubleBy2 function.
2 u/GBcrazy Apr 01 '17 Actually you are right, what the hell i was thinking
2
Actually you are right, what the hell i was thinking
14
u/GBcrazy Apr 01 '17
Well you can't really reuse arrow functions unless you put it into an object. Also it always binds
this...there are some scenarios where this arguably isn't wanted