关于react的router v6中的useRoutes问题

1、’useLocation() may be used only in the context of a <Router> component‘这一问题的解决:
添加HashRouter或者BowerRouter

2、在App.jsx中使用useRoutes()全部方法而会出现的问题

解决办法:
App.jsx中的布局

main.jsx中的布局
取消main.jsx的严格模式

添加HashRouter或者BowerRouter

3、使用routes包,分开来进行路由配置
routes/index.js

出现错误


问题解决
将routes/index.js改为routes/index.jsx
