-
Hi! Given a navbar with Menu Entries A, B and C I could create three boolean signals to determine if a menu entry is currently selected and setting this var to false for all not selected ones when an item is clicked. I guess this is a pretty ugly way of "marking the currently opened menu item". Another way would be to check the current URL against a menu item's value. But how do I get the current URL Path in Leptos from my Component? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This sounds to me like a very good use case for the |
Beta Was this translation helpful? Give feedback.
This sounds to me like a very good use case for the
<A/>
component, and if not, then the logic that<A/>
uses to check if it's active may be useful for you to just reuse.