0

We have a quite weird issue with a site we're currently building: http://akkurat.146.agency/photographers/florian-bison/0/8

Each page has two links (prev / next) on the edges of the screen that links to another route that always displays the same component, just with different parameters.

<Route exact path='/photographers/:slug/:job/:photo' render={() => ... } />

This works fine as long as the :photo Parameter is single-digit (up to 9). As soon as you keep clicking "next" and get to a route that has 10 or higher as the second parameter, the component remounts and then instantly unmounts causing the header information to being reset again.

Any ideas on why the behavior should differ at all depending on the ID length passed in the parameter?

Marcel
  • 674
  • 4
  • 15
  • Can you explain in more detail on what logic runs when prev or next is clicked? – Niraj Oct 28 '19 at 13:42
  • If you go from 10 to 9 then also it does not show the header. I don't think it's about single digit. – Niraj Oct 28 '19 at 13:45
  • Check if this link is useful https://stackoverflow.com/questions/32261441/component-does-not-remount-when-route-parameters-change – Niraj Oct 28 '19 at 13:48

0 Answers0