当前位置:网站首页>The left-hand side of an assignment expression may not be an optional property access. ts(2779)
The left-hand side of an assignment expression may not be an optional property access. ts(2779)
2022-07-07 12:28:00 【Zh afai】
background
Write ts and react ref when There are the following errors
It means iframeRef.current
May is empty , We cannot assign values directly like this , Then we just tell the editor iframeRef.current
It is OK to assign a value again
solve
- Use
!.
, This is justts
Type inference of , When runningiframeRef.curent
If there is no value, it will still be thrown wrong - Use condition judgment - recommend
边栏推荐
- 数据库系统原理与应用教程(009)—— 概念模型与数据模型
- 即刻报名|飞桨黑客马拉松第三期盛夏登场,等你挑战
- Upgrade from a tool to a solution, and the new site with praise points to new value
- College entrance examination composition, high-frequency mention of science and Technology
- 利用栈来实现二进制转化为十进制
- 《看完就懂系列》天哪!搞懂节流与防抖竟简单如斯~
- 【PyTorch实战】用RNN写诗
- The left-hand side of an assignment expression may not be an optional property access.ts(2779)
- 【统计学习方法】学习笔记——支持向量机(下)
- What are the technical differences in source code anti disclosure
猜你喜欢
Solve server returns invalid timezone Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
The hoisting of the upper cylinder of the steel containment of the world's first reactor "linglong-1" reactor building was successful
关于 Web Content-Security-Policy Directive 通过 meta 元素指定的一些测试用例
ES底层原理之倒排索引
idea 2021中文乱码
对话PPIO联合创始人王闻宇:整合边缘算力资源,开拓更多音视频服务场景
[statistical learning methods] learning notes - improvement methods
Xiaohongshu microservice framework and governance and other cloud native business architecture evolution cases
Customize the web service configuration file
BGP actual network configuration
随机推荐
OSPF exercise Report
The road to success in R & D efficiency of 1000 person Internet companies
Cenos openssh upgrade to version 8.4
Is it safe to open an account in Ping An Securities mobile bank?
《通信软件开发与应用》课程结业报告
跨域问题解决方案
TypeScript 接口继承
数据库系统原理与应用教程(011)—— 关系数据库
密码学系列之:在线证书状态协议OCSP详解
如何理解服装产业链及供应链
SQL Lab (46~53) (continuous update later) order by injection
Completion report of communication software development and Application
Several methods of checking JS to judge empty objects
[statistical learning methods] learning notes - improvement methods
防红域名生成的3种方法介绍
Tutorial on principles and applications of database system (009) -- conceptual model and data model
30. Few-shot Named Entity Recognition with Self-describing Networks 阅读笔记
源代码防泄密中的技术区别再哪里
Review and arrangement of HCIA
Typescript interface inheritance