I use react-router-dom
for routing in my React
application. Part of my app extracted in another package. List of dependencies looks like this:
Actually the issue was in your root component where you are doing routing, you should not add any component outside of Router
tag in the component, that component only expect single/multiple component wraped by Route
under Router
in that components.
wrong code (but it will run, but you are creating bug) -
function App() {
return (
);
}
I only remove
, it solved the issue.
write code -
function App() {
return (
);
}