gpt4 book ai didi

javascript - 如果 Spread Operator 在 redux 中不起作用

转载 作者:行者123 更新时间:2023-12-03 03:29:36 24 4
gpt4 key购买 nike

如果 Spread 运算符 (...) 在 redux 中不起作用。扩展运算符用于数组构造和解构,以及在调用时填充数组中的函数参数。运算符扩展数组(或可迭代对象)元素的情况。

最佳答案

open CMD

npm install --save-dev babel-plugin-transform-object-rest-spread

    and then create a file named .babelrc in your project directory, write the following code in it. Save and run npm.

{
"plugins": ["transform-object-rest-spread"]
}

Shared from https://github.com/kpilard

关于javascript - 如果 Spread Operator 在 redux 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46149765/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com