React Native 当我使用“?”进行条件渲染时,出现此错误:模块解析失败:您可能需要适当的加载程序来处理此文件类型

l3zydbqr  于 2023-03-19  发布在  React
关注(0)|答案(1)|浏览(49)

执行此操作时:

<p>{errors.fullName?.message}</p>

我的错误是:

Module parse failed: Unexpected token (49:21) You may need an appropriate loader to handle this file type.

有什么权宜之计吗?

guykilcj

guykilcj1#

你能不能试

{errors.fullName?.message && <p>{errors.fullName.message}</p>}

相关问题