title: How do I navigate backward and forward with React Router v5?
body: <p>I can refresh my pages, but when I use the back and forward buttons in chrome my app breaks. 
  I get this error: Uncaught TypeError: this.props.cars.map is not a function. I'm very new to React Router and I feel like this should be an easy fix.</p>
  
  <p>This is my App component:
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, { Component } from "react";
  
  import { BrowserRouter, Route, Switch } from "react-router-dom";
  
  import CarsIndex from "../containers/cars_index";
  import CarNew from "../containers/car_new";
  import CarShow from "../containers/car_show";
  import Error from "./error";
  
  function App() {
   return (
    &lt;Switch&gt;
     &lt;Route path="/" component={CarsIndex} exact /&gt;
     &lt;Route path="/new" component={CarNew} /&gt;
     &lt;Route path="/show/:id" component={CarShow} /&gt;
     &lt;Route component={Error} /&gt;
    &lt;/Switch&gt;
   );
  }
  
  export default App;</code></pre>
  </div>
  </div>
  </p>
  
  <p>and this is my index.jsx:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, { Component } from "react";
  import ReactDOM from "react-dom";
  import { Provider } from "react-redux";
  import { createStore, combineReducers, applyMiddleware } from "redux";
  import reduxPromise from "redux-promise";
  import logger from "redux-logger";
  import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
  import { createBrowserHistory } from "history"; 
  
  import "../assets/stylesheets/application.scss";
  
  import App from "./components/app";
  
  import carsReducer from "./reducers/cars_reducer.jsx";
  
  const initialState = {
   garage: "lenny",
   cars: [],
  };
  
  const reducers = combineReducers({
   garage: (state = null, action) =&gt; state,
   cars: carsReducer,
  });
  
  const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
  const middleWares = composeEnhancers(applyMiddleware(logger, reduxPromise));
  
  // render an instance of the component in the DOM
  ReactDOM.render(
   &lt;Provider store={createStore(reducers, initialState, middleWares)}&gt;
    &lt;Router&gt;
     &lt;App /&gt;
    &lt;/Router&gt;
   &lt;/Provider&gt;,
   document.getElementById("root")
  );</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks in advance.</p>