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
{{ message }}
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
I'm learning react-router, so I follow the tutorial and learn about <Links>. They work great. Now I want to make them work with Bootstrap, but I need to add the active class to the <li> instead of the <a>. I try to implement my own version of <Link> that adds the class in the correct place. It works on a page refresh but not while navigating, because my custom <BootstrapLink> gets the router from the context but doesn't use the ContextSubscriber mixin. I Google. I find withRouter. I think maybe it would be nice for this to be in the tutorial. 😄
Hopefully this will save learners some time and googling.
The text was updated successfully, but these errors were encountered:
My short story:
I'm learning react-router, so I follow the tutorial and learn about
<Links>
. They work great. Now I want to make them work with Bootstrap, but I need to add the active class to the<li>
instead of the<a>
. I try to implement my own version of<Link>
that adds the class in the correct place. It works on a page refresh but not while navigating, because my custom<BootstrapLink>
gets the router from the context but doesn't use theContextSubscriber
mixin. I Google. I findwithRouter
. I think maybe it would be nice for this to be in the tutorial. 😄Hopefully this will save learners some time and googling.
The text was updated successfully, but these errors were encountered: