title: React Router and Arbitrary Query Params: Page Refreshes Unintentionally on Load?
body: <p>I've been using React Router with great success the past few weeks, but I just ran into an issue that I can't seem to find a resolution for.  Whenever an arbitrary query parameter is appended to a url (in our case, for URL tracking purposes from email) the page that you land on will load, then automatically refresh without warning.  </p>
  
  <p>Given the most basic of route setups:</p>
  
  <pre><code>var routes = (
    &lt;Route handler={ResultsController}&gt;
       &lt;DefaultRoute handler={Results} /&gt;
    &lt;/Route&gt;
  );
  </code></pre>
  
  <p>And a default handler:</p>
  
  <pre><code>Router.run(routes, function (Handler, state) {
    React.render(&lt;Handler params={state.params} /&gt;, domElement);
  });
  </code></pre>
  
  <p>If I navigate to <code>http://whatever.com/results</code> everything works as it should, but if I navigate to <code>http://whatever.com/results?ref=track</code> the page will refresh and redirect back to <code>http://whatever.com/results#/</code>.  Please note that appending queryParams <em>after</em> the hash and slash results in correct behavior; problem is, many of these links are generated server-side and forcing hashes in such a way is not desired.  </p>
  
  <p>Do I need to setup a wildcard handler for queryParams?  Any pointers to documentation would be helpful as well.  </p>
  
  <p>Edit:<br>
  While this doesn't address the overarching question / bug leading to unintentional refreshes, I've found that loading the route using the Router.HistoryLocation PushState option allows for queryParams pre-render:</p>
  
  <pre><code>Router.run(routes, Router.HistoryLocation, function (Handler, state) {
    React.render(&lt;Handler params={state.params} query={state.query} /&gt;, domElement);
  });
  </code></pre>
  
  <p>Thanks!</p>