Solved
</nav>
<TransitionGroup>
<CSSTransition key={location.key} timeout={400} classNames='fade'>
<Switch location={location} >
<Route path="/" exact strict component={landingPage} />
<Route path="/cart" exact strict component={Connected3}/>
<Route exact strict path="/browse" component={Connected2} />
{/*<Route render={() => (fetch('/users/check', (res) => res.json()).then((res) => {console.log(res)})) } />*/}
<Route exact strict path="/login" component={Connected5} />
<Route exact strict path="/resetPassword" component={ForgotPassword} />
<Route exact strict path="/PasswordReset/:token" component={ResetPassword} />
</Switch>
</CSSTransition>
</TransitionGroup>
</div>
)}/>
</Router>