title: How to emulate window.location with react-router and ES6 classes
body: <p>I'm using react-router, so I use the <code>&lt;Link /&gt;</code> component for my links throughout the app, in some cases I need to dynamically generate the link based on user input, so I need something like  <code>window.location</code>, but without the page refresh.</p>
  
  <p>I found this little note - (<a href="https://github.com/rackt/react-router/issues/835" rel="noreferrer">https://github.com/rackt/react-router/issues/835</a>) - i tried using <code>this.context.router.transitionTo(mylink)</code> but I'm having issues with context... </p>
  
  <p>which led me to (<a href="https://github.com/rackt/react-router/issues/1059" rel="noreferrer">https://github.com/rackt/react-router/issues/1059</a>), however context returns and empty object, so when I try todo something like: <code>this.context.router.transitionTo(mylink);</code> I get <code>Cannot read property 'transitionTo' of undefined</code> (if I try to do something like set this.context = context within the constructor). </p>
  
  <p>Not to drag on, but I'm also weary of messing too much with context as it is undocumented on purpose as it's still a work in progress, so I've read.</p>
  
  <p>Has anyone come across a similar issue? </p>