通过mapstatetoprops中的2个相同参数

时间:2018-07-27 13:15:53

标签: javascript reactjs redux destructor

我在mapstatetoprops函数中有此功能:

const mapStateToProps = ({
    currencies: {
        charge: {
            amount,
            recurring: { amount },
        },
    },
})

因此,当我通过此操作时,我收到了短绒棉的错误消息:

Argument name clash in strict mode

显然amount被声明了两次

有什么想法可以做到吗?  我以为我可以做:amount: someOtherValue,但还是失败了

0 个答案:

没有答案