2👍
As I see in the Vue Router documentation, router-link
will automatically add an active class to your link when its target route is matched and you can easily set your custom class for it. So, you don’t need to handle it manually.
Source:stackexchange.com