-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
connect prevents LinkContainer from marking links as active #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is fixed in React Router |
In fact the last comment in the issue you linked says exactly that 😉 |
@gaearon thanks. Upgrading to React Router Got this warning though:
|
Just tested with |
export default connect(s => ({
user: s.user,
}))(withRouter(Header)) fixed the problem. |
The Link component is fixed in router 3.0 alpha 1. Not the LinkContainer component from the router bootstrap package. Unfortunately it doesn't even use the Link directly so it doesn't benefit from the Link being fixed. I will file an issue there. |
@gaearon ah ok thanks. Any idea why |
@olalonde Because both |
FWIW you can use |
Took me a while to figure this one out. For some strange reason, when I use connect to decorate my component,
<LinkContainer>
stops marking links as active. If I remove theconnect()(Header)
call,<LinkContainer>
works as expected.Here's the behaviour I get when using connect:
Thinks those are related but I can't figure out a quick/official fix:
remix-run/react-router#3286
remix-run/react-router#470
The text was updated successfully, but these errors were encountered: