今天做练习react路由出现错误,index.tsx:19 Uncaught Error: A is only ever to be used as the child of element, nev…
由于路由版本升级,Route需要在Routes组件内,并且component替换成element,括号中变为标签
<Routes
<Route path="/about" element={} />
<Route path="/home" element={} />
</Routes
记录一下
index.tsx:19 Uncaught Error: A <Route> is only ever to be used as the child of <Routes> element, nev
于 2022-02-07 17:19:45 首次发布