Open tiavina-mika opened 1 year ago
After I upgraded to "react-router-dom": "^6.15.0", I've got this error: Uncaught Error: You cannot render a <Router> inside another <Router>. You should never have more than one in your app.
"react-router-dom": "^6.15.0"
Uncaught Error: You cannot render a <Router> inside another <Router>. You should never have more than one in your app.
Here is my Routes component
import { createBrowserRouter, RouterProvider } from 'react-router-dom'; const router = [ { path: '/', element: <DashboardRouteLayout />, children: [ { path: '/', element: <RouteWrapper component={Home} />, }, ], }, ] const Routes = () => { return ( <ReduxRouter history={history}> <RouterProvider router={createBrowserRouter(router)} /> </ReduxRouter> ) }; export default Routes;
Can you create a simple github repository to reproduce the issue?
After I upgraded to
"react-router-dom": "^6.15.0"
, I've got this error:Uncaught Error: You cannot render a <Router> inside another <Router>. You should never have more than one in your app.
Here is my Routes component