Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrow function correction #1

Closed
kodemon opened this issue Dec 3, 2015 · 1 comment
Closed

Arrow function correction #1

kodemon opened this issue Dec 3, 2015 · 1 comment

Comments

@kodemon
Copy link

kodemon commented Dec 3, 2015

When you define a arrow function within a class method you no longer have to resort to assigning the 'this' context to refer to the class.

Arrow methods use the direct parent context when referring to 'this'.

https://github.com/niftylettuce/frisbee/blob/master/src/frisbee.js#L57

Source: http://codepen.io/somethingkindawierd/post/es6-arrow-functions-this

When I first learned this, arrow methods become really exciting.

@niftylettuce
Copy link
Collaborator

thanks @kodemon nice find

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants