title: How can I push value to url in react js?
body: <p>I want to push some text to url route in onChange method of an input like this :</p>
  <pre><code>function Header(props) {
   return (
    &lt;div&gt;
       &lt;input type=&quot;radio&quot; onChange={ (e)=&gt; props.history.push(`/${e.target.value}`) } &gt;
    &lt;/div&gt;
  )
  </code></pre>
  <p>But it throws multiple errors and crashes :</p>
  <pre><code>TypeError: Cannot read property 'push' of undefined
  </code></pre>
  <p>How can use history.push properly or how can I push some text to route url manually from anywhere in react ?</p>