How to change the image that has been clicked [react-router v4]
<p>I am using <strong>react router v4</strong> for routing. Link is applied in the image. When that image is clicked(if it is active), i want to change that image. </p>

<p>Here is the code to show the concept of what i want</p>

<pre><code>class PrivateServiceType extends Component {
  render() {
    console.log('context', this.context.router);
    let image = isActive ? 
      &lt;img src={IconHouseSelected} alt="apartamentos" className="img-responsive" /&gt; :
      &lt;img src={IconHouseNotSelected} alt="apartamentos" className="img-responsive" /&gt;
    return (
        &lt;div className="row text-center"&gt;
          &lt;div className="col-xs-12 col-sm-12 col-md-4 serviceImg"&gt;
            &lt;Link to="/apartamentos"&gt;
              {image}
              &lt;h4&gt;APARTAMENTOS&lt;/h4&gt;
            &lt;/Link&gt;
          &lt;/div&gt;
      )
}

PrivateServiceType.contextTypes = {
  router: React.PropTypes.object
}
</code></pre>