Question: I use react router dom in V5.

This is my router:

```
 <Router>
    <Switch>
      <Route path="/loggedIn">
        <LoggedInLandingPage />
      </Route>
      <Route path="/">
        <LandingPage />
      </Route>
    </Switch>
  </Router>

```

This is my code in my Register Page:

```
 const register = () => {
    Axios.post("registration", state)
    .then((response) => {
        console.log(response);
        try
        {
            setCookie("user", response.data);
            history.push("/loggedIn");
        }
        catch
        {

        }
    })
    .catch((error) => {
        console.error(error);
    })
}

```

So the URL changed, e.g. from [www.domain.com/register](http://www.domain.com/register) to [www.domain.com/loggedIn](http://www.domain.com/loggedIn) but the website didnt change / refresh. When I now hit F5 everything is fine.

What did I do wrong?

Answer: 
try this

```
 <Router>
    <Switch>
       <Route exact path="/" component={LandingPage}/>
       <Route path="/loggedIn" component={LoggedInLandingPage}>
    </Switch>
 </Router>

```
try

```
yarn add history@4.7.0

```

or

```
npm install history@4.7.0

```