React-router: Remounting on navigating between same route pahts with different params

Created on 8 Jan 2018  路  2Comments  路  Source: ReactTraining/react-router

Greetings! Thx for a great package!! Would like to know if you can help me with the following issue.
I am having trouble redirecting between two links, that are related to one but having different params. My component looks like folowing

<Route path='/dashboard/:folder?' component={Dashboard}>

So, lets say, I am currently on path '/dashboard/1', and somewhere in Dashboard child I have

<Link to={"/dashboard/2"}/>

Behavior is such that url changes, but component is not rerendering as i want it to. I want it to be remounted to have componentDidMount() called again. Is that possible? When I am navigating to some other path my Dashboard component unmounts, but not in case with same path with different params

All 2 comments

This is a bug tracker, not a support system. For usage questions, please use Stack Overflow or Reactiflux where there are a lot more people ready to help you out. Thanks!

@VALIKCOOL have you able to work this around?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicolashery picture nicolashery  路  3Comments

misterwilliam picture misterwilliam  路  3Comments

imWildCat picture imWildCat  路  3Comments

ArthurRougier picture ArthurRougier  路  3Comments

davetgreen picture davetgreen  路  3Comments