Skip to content
This repository has been archived by the owner on Oct 26, 2018. It is now read-only.

Request for custom Link #409

Closed
fingermark opened this issue Jun 8, 2016 · 1 comment
Closed

Request for custom Link #409

fingermark opened this issue Jun 8, 2016 · 1 comment

Comments

@fingermark
Copy link

fingermark commented Jun 8, 2016

This will likely get shot down, but I just wanted to bring it up in case I was doing something wrong.

I needed to use activeClassName on my react-router Link and found that it would only work intermittently. I had to pass {pure: false} to redux's connect for it to work 100% of them. Once I did that my component with the <Link /> was rendering whenever any state changed. After talking with someone on IRC they mentioned that it's because shouldComponentUpdate and context aren't mixing well.

The only solution I could come up with was to create my own custom Link component that reads the router state.

Would it be possible for react router to implement this component for us in the future?

@timdorr
Copy link
Member

timdorr commented Jun 8, 2016

Wrong repo. But this is coming: remix-run/react-router#3430 You can get it now with npm install react-router@next

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants