function handleDeposit (accountNumber, amount) {
type: 'DEPOSIT',
accountNumber,
amount
}
Run Code Online (Sandbox Code Playgroud)
它在调用时返回undefined.我不确定es6在这里使用的是什么功能
它等同于......
function handleDeposit (accountNumber, amount) {
return {
type: 'DEPOSIT',
accountNumber: accountNumber,
amount: amount
}
}
Run Code Online (Sandbox Code Playgroud)