title: Gain access to query parameters via React
body: <p>I have seen several posts that say you should reference this.props.location to gain access to the query string parameters.  However, whereever I check this property, location is always 'undefined'.  I am missing something obviously.</p>
  
  <p>Here is my setup...</p>
  
  <p><strong>package.json</strong></p>
  
  <pre><code>{
    "name": "Lender.Services.Web",
    "homepage": "/dataexchange/lender",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
      "bootstrap": "^3.3.7",
      "react": "^16.0.0",
      "react-bootstrap": "^0.32.1",
      "react-dom": "^16.0.0",
      "react-grid-system": "^4.1.1",
      "react-router-bootstrap": "^0.24.4",
      "react-router-dom": "^4.2.2",
      "react-scripts": "1.0.17",
      "rimraf": "^2.6.2"
    },
    "scripts": {
      "start": "rimraf ./build &amp;&amp; react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test --env=jsdom",
      "eject": "react-scripts eject"
    }
  }
  </code></pre>
  
  <p><strong>index.js</strong></p>
  
  <pre><code>import 'bootstrap/dist/css/bootstrap.css';
  import 'bootstrap/dist/css/bootstrap-theme.css';
  import './index.css';
  import React from 'react';
  import ReactDOM from 'react-dom';
  import { BrowserRouter } from 'react-router-dom';
  import App from './App';
  import registerServiceWorker from './registerServiceWorker';
  
  const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');
  const rootElement = document.getElementById('root');
  
  ReactDOM.render(
    &lt;BrowserRouter basename={baseUrl}&gt;
      &lt;App /&gt;
    &lt;/BrowserRouter&gt;,
    rootElement);
  
  registerServiceWorker();
  </code></pre>
  
  <p><strong>App.js</strong></p>
  
  <pre><code>import React, { Component } from 'react';
  import { NewRequest } from './components/NewRequest';
  
  export default class App extends Component {
      displayName = App.name
  
      render() {
          return (
              &lt;NewRequest /&gt;
          );
      }
  }
  </code></pre>
  
  <p>If I break in App.js in the render function, the this.props.location is undefined.  </p>
  
  <p>How do I gain access to the query string parameters with my setup?</p>