首页 > 其他分享 >记录报错 react Expected an assignment or function call and instead saw an expression no-unused-expressi

记录报错 react Expected an assignment or function call and instead saw an expression no-unused-expressi

时间:2023-01-03 15:03:24浏览次数:43  
标签:function no unused 报错 instead Expected call saw


报错:Expected an assignment or function call and instead saw an expression  no-unused-expressions Search for the keywords to learn more about each error.

期望一个赋值或函数调用,却看到一个表达式没有使用表达式

搜索关键字以了解每个错误的更多信息。

语法错误

原代码:

使用map循环遍历展示视图

记录报错 react Expected an assignment or function call and instead saw an expression  no-unused-expressi_原代码

改后不报错的代码:

map()中少写了return

记录报错 react Expected an assignment or function call and instead saw an expression  no-unused-expressi_原代码_02

标签:function,no,unused,报错,instead,Expected,call,saw
From: https://blog.51cto.com/u_12422954/5985776

相关文章