今天启动一个项目发现报如下错误:
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包裹即可。
评论前必须登录