Q: React router does not change view, but url is changed - App is load inside iframe I have react app loaded inside iframe. 
this is routing part: 


<Router>
    <Switch>
      <Route path="/" component={View} />
      <Route path="/create" component={CreateNewItemPage} />
    </Switch>
</Router>


and I use Links inside View.js to navigate: 


<Button
     variant="contained"
     color="primary"
     component={Link} 
     to="/create">
 Create
</Button>


Problem is that on click url is changed but view is not changing.
Maybe problem is that it's in iframe not sure. I faced this issue first time.
Tried 'exact' attribute for Route, but same issue.
Also there is no any error in browser console.

A: The reason might the lack of passing history to Router.
Check Router for more information
Example from Docs:


import React from "react";
import ReactDOM from "react-dom";
import { createBrowserHistory } from "history";

const customHistory = createBrowserHistory();

ReactDOM.render(<Router history={customHistory} />, node);


You could try <BrowserRouter> instead. BrowserRouter is nothing more than the Router with the HTML5 history API. Check BrowserRouter for more info
I hope it fixes your issue. Have a great day.
