title: How to get query string using React?
body: <p>I'm trying to get "query=123" from the url <a href="http://localhost:3000/?query=123" rel="noreferrer">http://localhost:3000/?query=123</a>. Tried </p>
  
  <pre><code>//App.js
  const search = this.props.location.search;
  const params = new URLSearchParams(search);
  const foo = params.get('foo');
  
  console.log(this.props);
  </code></pre>
  
  <p>and my console shows this <a href="https://d.pr/i/w5tAYF" rel="noreferrer">https://d.pr/i/w5tAYF</a>
  which doesn't show location.search anywhere... any idea how I would get the query string?</p>