本站域名已变更为https://blog.67v.cn,全新首页即将发布,尽情期待!!!

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

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

code
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包裹即可。

读完了点一下,作者能得积分

赞赏

如果这篇内容帮到了你,不妨请作者喝杯咖啡

分享 微博 QQ

发表评论

发表评论