title: Refresh position of element in React on location not changed
body: <p>I would like to change the left position of some objects every time a certain event occurs. How could I do that?</p>
  
  <p>I am rendering a list of components in another component. Those elements are positioned <code>absolute</code> and the (random) <code>left</code> position gets passed as props. </p>
  
  <pre><code>getAllWorksTiles() {
    const elementsList = this.getElementsList();
  
    return elementsList.map(
      e =&gt;
        &lt;WorksTile
          title={ e.title }
          description={ e.description }
          key={ e.title }
          left={ this.getRandomHPos() }
          image={ e.image }
          link={ e.link }/&gt;
    )
  }
  
  getRandomHPos() {
    return Math.random() * 60;
  }
  </code></pre>
  
  <p>I am using React Router DOM and I would like to re-position those elements every time the page gets either PUSHED or PULLED (so <code>this.props.history.action !== 'REPLACE'</code>).</p>
  
  <p>I have tried to re-mount the whole component but I am sure that there is a smarter way? </p>