vue-realworld-example-app
vue-realworld-example-app copied to clipboard
VTag: Use computed property for router link
<router-link
:to="{ name: 'home-tag', params: { tag: name } }"
:class="className"
>
Ideally, { name: 'home-tag', params: { tag: name } }
should be a computed property and then used like:
<router-link
:to="homeLink"
:class="className"
>
Related resources:
- https://vuejs.org/v2/guide/computed.html
I can tackle this if you don't mind.
PR at #224
Use computed property for router link #231
@andriyfm this PR got error that name
is null
We should accept pull request of @kylerits . That PR fix my error