Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v-router warning about using v-slot #3457

Closed
719media opened this issue Jan 25, 2021 · 0 comments · Fixed by #3458, juicyfx/juicy#677, juicyfx/juicy#681 or Netflix/dispatch#961
Closed

v-router warning about using v-slot #3457

719media opened this issue Jan 25, 2021 · 0 comments · Fixed by #3458, juicyfx/juicy#677, juicyfx/juicy#681 or Netflix/dispatch#961

Comments

@719media
Copy link

Version

3.5.0

Reproduction link

d2cb951#diff-d69779a774d18aab6696dcf281454982a329104177c1a5f885089da9fefefd94R134-R148

Steps to reproduce

See the conditions for firing the warning:

d2cb951#diff-d69779a774d18aab6696dcf281454982a329104177c1a5f885089da9fefefd94R134-R148

What is expected?

You should only get the warning about using v-slot if you are actually using tag or event props

What is actually happening?

Since tag and event have non-falsey default values, the warning will always fire with any use of router-link.


Perhaps you should just compare if the values for tag or event are non-default and fire the warning, even though this doesn't cover the edge case that tag or event are actually being passed in with a value that matches the default.

jonaskuske added a commit to jonaskuske/vue-router that referenced this issue Jan 26, 2021
closes vuejs#3457
Only show deprecation warning if the props "tag" or "event" are actually passed by the consumer (key exists in propsData), not if they have any value at all (they always have a value since a default is specified in the props definition)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment