禁止在 React 组件定义中缺少 props 验证

问题描述 投票:0回答:1

当我使用Vite创建react项目时,在定义prop时遇到以下错误。如果我创建 React App 没有这个问题,为什么会出现这个错误?也许我还没有安装模块?

enter image description here

reactjs frontend jsx vite react-props
1个回答
0
投票

检查此链接,您需要为组件创建 proptypes 日志火箭

© www.soinside.com 2019 - 2024. All rights reserved.