无法在构造函数中分配此 [英] Can't assign this in constructor
本文介绍了无法在构造函数中分配此的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将道具从values
合并到this
.
I'm trying to merge the props from values
into this
.
以下引发错误.我该怎么办?
The following throws an error. How can I do this?
this = {...this, ...values}
推荐答案
您可以使用 查看全文