You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
💄
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.
The text was updated successfully, but these errors were encountered: