坑1:A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.
6.0版本,引入了<Routes>组件来包裹<Route>
坑2:useHref() may be used only in the context of a <Router> component.
<Link>组件必须包裹在<Router>内部使用
坑3:element属性替换原有的component属性
坑4:嵌套路由模糊匹配,父路由path后面要跟/*,子路由path后面不用带父路由路径
浙公网安备 33010602011771号