React Router v6把<Redict>
替换为了`
故重定向写法更新为
在这里插<Routes>
<Route path="/about" element={<About/>}/>
<Route path="/home" element={<Home/>}/>
<Route path="*" element={<Navigate to="/about" />}/>
</Routes>入代码片
React Router v6把<Redict>
替换为了`
故重定向写法更新为
在这里插<Routes>
<Route path="/about" element={<About/>}/>
<Route path="/home" element={<Home/>}/>
<Route path="*" element={<Navigate to="/about" />}/>
</Routes>入代码片