当前位置:网站首页>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
边栏推荐
- Hi3516全系统类型烧录教程
- Static comprehensive experiment
- Learning and using vscode
- NGUI-UILabel
- Solve server returns invalid timezone Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
- 即刻报名|飞桨黑客马拉松第三期盛夏登场,等你挑战
- Inverted index of ES underlying principle
- The road to success in R & D efficiency of 1000 person Internet companies
- TypeScript 接口继承
- 关于 Web Content-Security-Policy Directive 通过 meta 元素指定的一些测试用例
猜你喜欢
idm服务器响应显示您没有权限下载解决教程
[pytorch practice] image description -- let neural network read pictures and tell stories
普乐蛙小型5d电影设备|5d电影动感电影体验馆|VR景区影院设备
SQL lab 26~31 summary (subsequent continuous update) (including parameter pollution explanation)
111.网络安全渗透测试—[权限提升篇9]—[Windows 2008 R2内核溢出提权]
Customize the web service configuration file
Solutions to cross domain problems
VSCode的学习使用
@Bean与@Component用在同一个类上,会怎么样?
【深度学习】图像多标签分类任务,百度PaddleClas
随机推荐
顶级域名有哪些?是如何分类的?
An error occurred when vscade tried to create a file in the target directory: access denied [resolved]
小红书微服务框架及治理等云原生业务架构演进案例
wallys/Qualcomm IPQ8072A networking SBC supports dual 10GbE, WiFi 6
111.网络安全渗透测试—[权限提升篇9]—[Windows 2008 R2内核溢出提权]
密码学系列之:在线证书状态协议OCSP详解
解密GD32 MCU产品家族,开发板该怎么选?
【玩转 RT-Thread】 RT-Thread Studio —— 按键控制电机正反转、蜂鸣器
开发一个小程序商城需要多少钱?
Typescript interface inheritance
What is a LAN domain name? How to parse?
[neural network] convolutional neural network CNN [including Matlab source code 1932]
@What happens if bean and @component are used on the same class?
Will the filing free server affect the ranking and weight of the website?
Minimalist movie website
Problem: the string and characters are typed successively, and the results conflict
How to understand the clothing industry chain and supply chain
110. Network security penetration test - [privilege promotion 8] - [windows sqlserver xp_cmdshell stored procedure authorization]
盘点JS判断空对象的几大方法
防红域名生成的3种方法介绍