Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Those are not equivalent. You still have to pass on the parameters:

    this.setup = function () {
      this.on('tweet', (e, data) => this.handleStreamEvent('tweet', e, data));
      this.on('retweet', (e, data) => this.handleStreamEvent('retweet', e, data));
    };


Good catch. Once they are added though, it feels a lot more readable than the "bind" alternative.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: