无法在构造函数中分配此 [英] Can't assign this in constructor

查看:85
本文介绍了无法在构造函数中分配此的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将道具从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}

推荐答案

您可以使用 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆