News for hackers. Stuff that matters.
Re:ES6 is beautiful by btdiehr on Thursday April 07, 2016 @03:04PM (#11449727)
If you want to return an object literal just do this,

`(text) => ({ label: text })`

In my opinion the arrow function has great syntax. Rest assured, no matter what the syntax was chosen to be, there would be an extremely vocal group of people who hate it (such as yourself).

There are no comments on this comment yet.