title: Get current location from react-router-redux
body: <p>How do you get the current location when using "react-router-redux"?</p>
  
  <p>This is the <code>routing</code> state:</p>
  
  <pre><code>{
      routing: {
          locationBeforeTransition: {
              pathname: "/foo",
              search: "",
              hash: "",
              state: null,
              action: "PUSH",
              key: "e8jfk"
          },
          query: null,
          $searchBase: {
              search: "",
              searchBase: ""
          }
      }
  }
  </code></pre>
  
  <p>I can clearly access the current location as <code>state.routing.locationBeforeTransition.pathname</code>, but the name "locationBeforeTransition" seems like it would be the previous page location, not the current one.  It also seems odd that this is the only property in my routing state. I suspect I am doing something wrong.</p>
  
  <p>Here is a simplified reducer that only has routing:</p>
  
  <p><strong>reducer.js</strong></p>
  
  <pre><code>import { combineReducers, createStore, applyMiddleware, compose } from 'redux';
  import { routerReducer, routerMiddleware } from 'react-router-redux';
  import { browserHistory } from 'react-router';
  import thunkMiddleware from 'redux-thunk';
  
  const reducer = combineReducers({ 
    routing: routerReducer, 
  });
  
  export const store = createStore(reducer, {}, compose(
      applyMiddleware(
        routerMiddleware(browserHistory), 
        thunkMiddleware
      ),
      window.devToolsExtension ? window.devToolsExtension() : f =&gt; f
    )
  );
  </code></pre>