Skip to content

What is the proper way to mark a Link current active page? #2408

Answered by voidpumpkin
Magicloud asked this question in Q&A
Discussion options

You must be logged in to vote

For function components simply use use_route to get the current route
For struct components its a bit complicated because you need to create a listener that would listen to route changes https://yew.rs/docs/concepts/router#struct-components-1

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Magicloud
Comment options

@Magicloud
Comment options

@Magicloud
Comment options

@voidpumpkin
Comment options

@Magicloud
Comment options

Answer selected by Magicloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants