title: Programmatically redirecting inside child component in React JS is not working
body: <p>I am developing a web application using React JS. Now, I am trying to programmatically redirect to another route. I can redirect like this.</p>
  
  <pre><code>this.props.history.push('/event/${this.props.id}/edit');
  </code></pre>
  
  <p>But when I use that in the child component it is not working. This is my scenario. I have a parent component called, EventListComponent. Inside that component, I render another child component called EventWidgetComponent. I am redirecting in the child component. But this.props.history is always undefined when I use it in the child component. How can I fix it?</p>