6

In Buefy navBar component item element have

<b-navbar-item href="/job">
            job
</b-navbar-item>

It render standart a html tag. When clicked, page reloaded. I want use nuxt-link Nuxt tag whithout reloading page.

This code works, but i got broken css design Bulma navbar.

<b-navbar-item >
    <nuxt-link to="/job">
        Job
    </nuxt-link>
</b-navbar-item>
Ilya Vo
  • 2,239
  • 3
  • 18
  • 31

1 Answers1

11

Two ways:

  1. Don't use buefy navbar, just class:
<nuxt-link to="/job" class="navbar-item">
    Job
</nuxt-link>
  1. Use tag:
<b-navbar-item tag="nuxt-link" to="/job">
    job
</b-navbar-item>

See https://buefy.org/documentation/navbar#api-view

ManUtopiK
  • 4,495
  • 3
  • 38
  • 52
  • which one better? or whatever? – luke cross Jun 05 '21 at 20:54
  • 1
    None is better than the other. It's a question of preference. If you need functionality of buefy navbar, go with it. This component is well written. If you don't need some many functionalities, you can go with your own implementation... – ManUtopiK Jun 06 '21 at 21:45