You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project with a lot around react-router (react-router-redux among other things) so I'm still trying to isolate the problem but I'm posting the issue in the meantime if someone is having the same problem at the same time... or even an idea of where to look for.
Test Case
Clicking on a <Link /> in a header
Steps to reproduce
Working on it
Expected Behavior
The active style being added to the Link I just clicked and removed from the Link of the route we just left.
Actual Behavior
Rendering the right component but since no props changed in my header's Link they don't re-render. By adding Link.componentDidMount = () => this.context.router.listen(this.render.bind(this)) it re-render but is always keeping the active style once it has been active once.
The text was updated successfully, but these errors were encountered:
After using JSBin, the problem doesn't reproduce, so the problem is probably coming from the combinaison with react-router-redux or just in my set-up. I'll continue to work on that
I got this issue too, and after searching for the answer, I think it might be something related to Redux. As being discussed at #3536 , a container component which is wrapped by Redux's connect() will make all the Links in it fail to change their active state. Also in the comment section @mertkahyaoglu said that he would simply put an option {pure: false} to connect() but it does not work for me.
Version
2.4.0
I have a project with a lot around
react-router
(react-router-redux
among other things) so I'm still trying to isolate the problem but I'm posting the issue in the meantime if someone is having the same problem at the same time... or even an idea of where to look for.Test Case
Clicking on a
<Link />
in a headerSteps to reproduce
Working on it
Expected Behavior
The active style being added to the
Link
I just clicked and removed from theLink
of the route we just left.Actual Behavior
Rendering the right component but since no props changed in my header's
Link
they don't re-render. By addingLink.componentDidMount = () => this.context.router.listen(this.render.bind(this))
it re-render but is always keeping the active style once it has been active once.The text was updated successfully, but these errors were encountered: