Replies: 4 comments 1 reply
-
Facing this exact problem atm. Not exactly show stopping, but it seems needlessly annoying since I know the NavLink has the info, it just isn't exposing it in a general way. |
Beta Was this translation helpful? Give feedback.
-
I just had the same issue, trying to make the icon and text of a NavLink change color if the link is active but using different colors between them, I ended up making them both the same color but would be great to support this. |
Beta Was this translation helpful? Give feedback.
-
In case somebody else gets here and gets confused like me, this feature was actually introduced in Pull Request #8164, pretty much exactly as @rabah asked for. |
Beta Was this translation helpful? Give feedback.
-
Could even have a We tried to get away from render props when hooks came out, but I'm also finding that I want them pretty often so I don't need the indirection of a new component just to use a hook. I'm on board. 👍 |
Beta Was this translation helpful? Give feedback.
-
Hi All,
I was really happy when the
isActive
prop was released onclassName
andstyle
attributes, but one functionality I would have found useful is to access it inside the component itself:I know that this issue is easily solvable if you create active classes and target whatever is inside the parent class, but when using tailwind, it's very useful having access inside the component like this. This is not a major hindrance, but I believe you could create much more interesting NavLinks with this. I checked the code for the
NavLink
and it seems pretty straightforward to add this feature. Im happy to create a pull request for this.Any feedback will be appreciated 😄.
Beta Was this translation helpful? Give feedback.
All reactions