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

router-link doesn't work correctly when rendered within a functional component #2513

Closed
deepkolos opened this Issue Dec 2, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@deepkolos

deepkolos commented Dec 2, 2018

Version

3.0.1

Reproduction link

https://github.com/deepkolos/vue-router-link-bug-demo

Steps to reproduce

router-link-bug.gif

What is expected?

when come back router-link's classList is "f-link default-link" as it's inital state

What is actually happening?

router-link's classList become empty

@posva

This comment has been minimized.

Member

posva commented Dec 2, 2018

Could you put that into a code sandbox so I can check please?

@posva

This comment has been minimized.

Member

posva commented Dec 8, 2018

class is a bit different from other attrs, set it in staticClass when calling h instead of adding it to attrs.class

staticClass: `f-link ${staticClass}`,

@posva posva closed this Dec 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment