question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

router-link generated cause warning from vue-router

See original GitHub issue

After update vue-router from 3.1.5 to 3.5.1 got warning in console:

[vue-router] <router-link>'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#rem

b-nav-item (at least) with property “to” cause router-link generation. As far as I see vue router is preparing for the switching to new version (4 I guess) and produce such warnings.

Steps to reproduce the bug

Create b-navbar with b-nav-item with property “to” used. Example: <b-nav-item to="/Orders" >Link Text</b-nav-item>

Expected behavior

Now warnings in console

Versions

Libraries:

  • BootstrapVue: 2.21.2
  • Vue: 2.6.12
  • Vue Router: 3.5.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:43
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
caugnercommented, Jul 1, 2021

Duplicate of #6373.

The issue was fixed by #6374 and will appear in the next minor version (2.22.0). That PR resolves the warnings for most users, except those that actually use the event and tag props on BLink and similar components.

2reactions
daomtthuancommented, May 29, 2021

I have an obsessive compulsion, so I don’t feel okay with things that aren’t perfect even though I know it’s just a warning, not an error. Sorry! Hopefully there will be no more warnings at version 2.21.3 Have you followed this docs? https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link

Read more comments on GitHub >

github_iconTop Results From Across the Web

In Vue Router 4, the v-slot API will by default wrap its content ...
This warning is appearing, because there is a change in Vue Router v4 that has changed how <router-link> works, and this is letting...
Read more >
API Documentation | Vue Router
RouterLink #. • Const RouterLink: _RouterLinkI. Component to render a link that triggers a navigation on click. RouterView ...
Read more >
How To Navigate Between Views with Vue Router
This router makes an association with a view to a URL. In this tutorial, you are going to learn how to add the...
Read more >
Using Vue 3's Router in Practice - Daily.dev
Vue Router is one of the best highlights in the Vue ecosystem. This article covers some standout features of Vue Router like programmatic ......
Read more >
Let's Build a Custom Vue Router | CSS-Tricks
If the getRouteObject() method returns undefined , we display a “Not Found” template. If getRouteObject() returns an object from routes , we ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found