Changelog
0.18.4
Changelog
0.18.3
Changelog
0.18.0
Removed this.dispatch from Actions commit.
Upgrade Guide
Use the included codemod to convert your actions.
You will need jscodeshift to run the codemod.
npm install jscodeshift -g
jscodeshift -t scripts/this-dispatch-to-return.js your_file.js
I recommend you use some source control like git
this way you can git diff
your changes and make sure everything is ok.
You can manually upgrade by removing this.dispatch
from your actions and instead return your payload directly.
If you have an async action then you can return a function.
// from this
class MyActions {
someAction() {
this.dispatch(13)
}
}
// to this
class MyActions {
someAction() {
return 13
}
}
or
// from this
class MyActions {
asyncThings() {
xhr('foo', () => {
this.dispatch(42)
})
}
}
// to this
class MyActions {
asyncThings() {
return (dispatch) => {
xhr('foo', () => {
dispatch(42)
})
}
}
}
Deleted all of utils
, mixins
, components
, and addons
from alt package.
Upgrade Guide