title: React router redirect not working when in function
body: <p>I am attempting to redirect on clicking an item, however the redirect doesn't seem to render...</p>
  <pre><code>const doRedirect = () =&gt; {
      console.log('redirecting');
      return &lt;Redirect to='/my-path' /&gt;;
  }
  
  return &lt;div onClick={() =&gt; doRedirect()}&gt;Click me&lt;/div&gt;;
  </code></pre>
  <p>When I click the div, it is hittin the console log just fine, however I can't seem to get it to return the redirect...</p>