javascript - 试图分配给只读属性反应本机错误
问题描述
我有以下(切换)功能:
toggleMenu = () => {
const toValue = this.open ? 0 : 1;
Animated.spring(this.animation, {
toValue,
friction: 5,
}).start();
this.open = !this.open;
};
我收到“尝试分配给只读属性”错误。有人可以解释这是为什么,以及如何解决吗?谢谢!
解决方案
推荐阅读
- javascript - 获取 tbody td 的值
- amazon-web-services - 无法从 AWS 控制台修改 S3 存储桶上的任何设置
- jquery - HTML 基于 td 标签内容使用 javascript 更改字体粗细
- c# - Exchange Webservices将邮件转发到C#中的错误邮件地址
- spring - Spring boot Data JPA 是否在内部使用休眠来实现它?
- sql-server - 在 SSMS 中使用存储过程时使用批量插入 Azure SQL DB 时出错
- mysql - 在连接 2 个表的情况下在两个表上创建索引的好处
- angular - 打字稿:无法将默认参数值设置为 false
- javascript - 用触摸事件反应日历
- c# - 在这个例子中我们如何编写一个高阶函数?