Error: A <Route> is only ever to be used as the child of <Routes> element, never rendered directly.
原因React路由版本问题,你可以查看自己的package.json文件,查看react-router-dom的版本,应该是6版本。在React-Routerv6版本中,Route更改了使用方式。//最新语法}/>}/>{/*5版本*/}解决1切换5点几版本[email protected]按照最新语法原因React路由版本问题,你可以查看自己的package.json文件,查