redux-react-router
redux-react-router copied to clipboard
You cannot render a <Router> inside another <Router>
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
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?