title: How can I parse the query in url in react js using url-parse package?
body: <p>I want to parse the query in the url in react js like this :</p>
  <pre><code> const location = useHistory().location;
   const parsed = parse(location, true);
   console.log(parsed);
  </code></pre>
  <p>But the console gives me this :</p>
  <pre><code>host: &quot;localhost:3000&quot;
  hostname: &quot;localhost&quot;
  href: &quot;http://localhost:3000/[object Object]&quot;
  origin: &quot;http://localhost:3000&quot;
  password: &quot;&quot;
  pathname: &quot;/[object Object]&quot;
  port: &quot;3000&quot;
  protocol: &quot;http:&quot;
  query: {}
  slashes: true
  </code></pre>
  <p>The query object is empty which I need that one and the pathname is not useable .
  How can I parse the query in url in react js using url-parse package properly?</p>