Fix ActionForm example
Closed this issue · 0 comments
nhunzaker commented
http://code.viget.com/microcosm/api/action-form.html
repo.addDomain('count', {
getInitialState () {
return 0
},
increase (count, amount) {
return count + amount
},
register () {
return {
[increaseCount] : this.increase
}
}
})
The payload is wrong in increase
. It should be:
repo.addDomain('count', {
getInitialState () {
return 0
},
increase (count, { amount }) {
return count + amount
},
register () {
return {
[increaseCount] : this.increase
}
}
})