React does not recognize the `computedMatch` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `computedmatch` instead

 2021年03月06日 分类:React/前端设计  评论(0)  阅读(194)

今天启动一个项目发现报如下错误:

React does not recognize the `computedMatch` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `computedmatch` instead

然后搜索了一下,是由于在react-router-dom<Switch>中使用了<div>标签导致,只需要把div移到外层或者使用React.Fragment包裹即可。

wechat_app
微信公众号:webapp_club
关注一下,或许能让你获得更多前端咨询信息。
加载中...

评论 抢沙发

评论前必须登录(开发中...)