I'm getting the You should not use <Route> or with Router() outside a <Router> error, but I'm already calling the route inside the router. There is my index.js:
import { BrowserRouter as Router, Route } from "react-router-dom";
import App from "./components/App";
const Wrapper = () => (
<Router>
<Route path="/:view?/" render={(props) => <App {...props} />} />
</Router>
);
ReactDOM.render(<Wrapper />, document.getElementById("root"));
Every route is inside App and therefore wrapped by the Router. Does anyone have any idea why it could be happening here?
Thank you for your help,
I found out what was happening.
MDBReact Prodoesn't support the latest version ofreact-router-dom(what is kinda strange because their free version works well with it). I had to downgradereact-router-domto version4.3.1. Thank you, Shlang, for the hint. It helped me to figure out what was happening