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.

b-nav-item / b-link problem with HMR

See original GitHub issue

While testing out the b-navbar component and messing with vue-router’s :to attribute, i noticed a really weird behaviour.

At first i noticed that trying to do an object based link via the name property (like :to="{name: 'home'}"), it produced a link like localhost/[object Object]. From there i just assumed that it was failing to pass the object to the internal router-link correctly, so i just switched to a simple string (Like to="/").

However, when messing around seeing how hard it would be to replicate the behaviour of the b-nav-item component using the router-link component, i noticed that the link started working properly when i copied the configuration from router-link to b-nav-item, but only when the component was injected via HMR…

I’m not entirely sure on what the exact reproduction steps are, however it appears to be a combination of Hot Module Reloading, and editing the :to property of the b-nav-item

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pi0commented, May 3, 2017

You are right. fixed.

0reactions
pi0commented, May 5, 2017

@mosinve The main idea behind using hrefString fallback was SSR problems with older vue-router. There are more than problems than its benefits forcing href or deduction it’s value based on to prop. (For example it causes invalid links when we are prefixing urls)

Read more comments on GitHub >

github_iconTop Results From Across the Web

bootstrap-vue - UNPKG
/_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return ... preventDefault()\n }\n }\n}\n\n// @vue/component\nexport const BLink ...
Read more >
Nav | Components - BootstrapVue
<b-nav-item> for actionable links (or router-links) ... should avoid using dropdown menus, as this causes both usability and accessibility issues:.
Read more >
bootstrap-vue @ 2.0.0-rc.18 .. 2.0.0-rc.19 - Package Diff
+- **b-modal:** handle HMR when defining property on Vue prototype. + ([#3123](https://github.com/bootstrap-vue/bootstrap-vue/issues/3123).
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