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

Make sure ActionCreators will work with es6 arrow syntax #83

Closed
therealcisse opened this issue Jan 25, 2015 · 0 comments
Closed

Make sure ActionCreators will work with es6 arrow syntax #83

therealcisse opened this issue Jan 25, 2015 · 0 comments

Comments

@therealcisse
Copy link
Contributor

💄

In some es6 transpilers, ES6 arrow functions are bound to the current scope making it impossible to call this.dispatch(...) or other methods of the ActionCreators inside the callback.

By passing context as the last argument to the ActionCreator, one can use context.dispatch(...) or other methods of the ActionCreator.

Since context is passed as the last argument, all existing code work as is and if you don't use es6 arrow syntax, you're not affected.

@therealcisse therealcisse changed the title Make sure ActionCreators will work with es6 arrow functions Make sure ActionCreators will work with es6 arrow syntax Jan 25, 2015
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

1 participant