学无先后,达者为师

网站首页 编程语言 正文

is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.

作者:田本初 更新时间: 2023-10-13 编程语言

< xxx /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.

背景

antd3升级到4后发现切换路由时白屏并报如下错误

在这里插入图片描述

分析解决

翻译译为: 组件大小写错误

报错原因: 组件首字母小写了

<Route 
	render={props => <Alipinvertify{...props}/>}
	path="/xxx/xxx/xxx"
/>
<Route 
	render={props => <SsoBasicinfo{...props}/>}
	path="/xxx/xxx/xxx"
/>

这是之前书写不规范造成的,将首字母大写后,警告消失

原文链接:https://blog.csdn.net/owo_ovo/article/details/132063393

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新